In my previous post I have described how to implement PATCH method with Oracle JET and call ADF BC REST service to update row attributes - Very Practical CRUD with JET and ADF BC - PATCH Method. Today I'm going to complete CRUD implementation with POST and DELETE methods, to create and delete rows through ADF BC REST service and JET UI.
Here you can watch video, where I demonstrate PATCH, POST and DELETE methods invoked from JET UI. Also you are going to see how pagination works with JET paging control and ADF BC range paging mode (Oracle JET Collection Paging Control and ADF BC REST Pagination Perfect Combination):
Download sample application - JETCRUDApp_v3.zip. This sample app contains JET UI and ADF BC REST implementation. I'm going to explain in more detail steps recorded in the above video.
Salary column was updated with right align in the new sample, in JET we can assign class name for table cell:
JET supports date formatters and converters. I was using yyyy-MM-dd pattern to format Hire Date attribute value:
POST method - row creation
New row is created with JET collection API method create. I have implemented success callback, if POST method in REST was successful and new row was inserted - collection is refreshed to display new row. There is no need to refresh, if collection is not virtualized (fetchSize and pagination is not used):
DELETE method - row removal
Row is removed from JET model with API method destroy. This calls DELETE method triggering REST service and removes row from JET collection, by refreshing current page (invoking GET method for collection page):
POST method test. Example of new row creation:
POST method is invoked by JET, which in turns calls ADF BC REST service and inserts new row through ADF BC into DB:
PATCH method test. Example of attribute value update. I have changed Salary attribute value:
Row with ID is updated by PATCH method through REST service call:
DELETE method test. Example of row removal:
Row with ID is removed by DELETE method through REST service call:
In my next posts I'm going to describe how implement validation and handle REST call errors.
Here you can watch video, where I demonstrate PATCH, POST and DELETE methods invoked from JET UI. Also you are going to see how pagination works with JET paging control and ADF BC range paging mode (Oracle JET Collection Paging Control and ADF BC REST Pagination Perfect Combination):
Download sample application - JETCRUDApp_v3.zip. This sample app contains JET UI and ADF BC REST implementation. I'm going to explain in more detail steps recorded in the above video.
Salary column was updated with right align in the new sample, in JET we can assign class name for table cell:
JET supports date formatters and converters. I was using yyyy-MM-dd pattern to format Hire Date attribute value:
POST method - row creation
New row is created with JET collection API method create. I have implemented success callback, if POST method in REST was successful and new row was inserted - collection is refreshed to display new row. There is no need to refresh, if collection is not virtualized (fetchSize and pagination is not used):
DELETE method - row removal
Row is removed from JET model with API method destroy. This calls DELETE method triggering REST service and removes row from JET collection, by refreshing current page (invoking GET method for collection page):
POST method test. Example of new row creation:
POST method is invoked by JET, which in turns calls ADF BC REST service and inserts new row through ADF BC into DB:
PATCH method test. Example of attribute value update. I have changed Salary attribute value:
Row with ID is updated by PATCH method through REST service call:
DELETE method test. Example of row removal:
Row with ID is removed by DELETE method through REST service call:
In my next posts I'm going to describe how implement validation and handle REST call errors.