Tuesday, May 10, 2016

Oracle JET 2.0.1 - Upgrade for CRUD Sample

Oracle JET 2.0.1 was released in April and I decided to upgrade my CRUD sample (based on ADF BC REST services) implemented with previous JET version. There is migration guide, describing main points to consider, while moving to the next JET version. I'm going to add few more points. Hopefully you will find it useful.

Here is CRUD sample UI running with Oracle JET 2.0.1 and interacting with ADF BC REST:

This sample comes with advanced validation rule integration, which is being enforced in ADF BC and propagated to JET UI (read my previous posts about this):

As per migration guide, you must update reference for Alta CSS (2.0.1):

Next update module names in main.js:

CRUD app is rendering paged table out of collection table datasource. Somehow it worked previously, without specifying ojs/ojcollectiontabledatasource module, now it must be specified, otherwise there is error about constructor:

There are changes on UI side. I have wrapped table/form into div with oj-flex-items-pad (includes padding). Table and form and places into separate div's, with oj-flex-item class:

To enable table pagination, I moved it out of div, in previous version it worked inside separate div:

Form group elements are wrapped into oj-flex/oj-flex-item class, this creates better layout for form items:

Update method was changed to handle ADF BC validation error in slightly different way. I'm showing error first and next resetting collection data - to return original value into the table.

Download sample application - JETCRUDApp_v6.zip.


Sreenivas Manthri said...

thanks andrejus, i am following the link to get started installed nodejs , reactjs and oracle jet : http://www.oracle.com/webfolder/technetwork/jet/globalExamples-HOL.html
I feel netbeans is good tool for oracle jet rather then jdeveloper 12c . Please suggest your opinion.

Sreenivas Manthri said...
This comment has been removed by the author.
Unknown said...

Hi Andrejus,

What's the performance of this compared to ADF tables. Would it be worth the switch?

Andrejus Baranovskis said...

Well, performance is better - it is client side. But you cant expect same level of developer productivity. ADF is good for large enterprise systems. JET is good for smaller and public facing apps.

It is worth to check JET cookbok for examples - http://www.oracle.com/webfolder/technetwork/jet/uiComponents-formControls.html