This is not a tutorial or deep explanation of every new API. It is a sample APP. To get anything out of it you will need to download the New API Features 22.1 app and read through the notes (click Notes link in top banner) on each page and also the code comments. If you haven’t installed APEX 22.1 yet you can use apex.oracle.com. First install the tables needed by this APP. Install Sample Interactive Grids app to get the EBA_DEMO_IG_PEOPLE and EBA_DEMO_IG_EMP tables. This will be fun because you get to use the new App Gallery. From SQL Workshop Utilities/Sample Datasets install Tasks Spreadsheet to get the EBA_TASKS_SS table.
Reminder: Any forward looking statements I make in this blog or the sample app is just my opinion not an official statement of product direction.
Here is the functionality that you will find in this app:
- Client side filtering of Cards region
- Control break style grouping of Cards
- Card editing with optimistic UI updates (no need to refresh the report)
- Using a menu button for the Sort Order item choices
- Getting Cards data from client side REST ajax request
- Fetching data for multiple regions at once (only for model based regions)
- Invoking Interactive Grid actions from buttons and menus outside the region
- Control over what cell value is copied to the clipboard in Interactive Grid grid view
- A “Content Row” region plug-in that works with sort order items and facets
In APEX there was often no better option when you needed to run code from a shared component list entry, Card region action, or report column link. Now there is a much better solution. Starting in 22.1 action objects can be bound to links. If you don’t know about the apex.actions namespace and the actions interface take a look at the documentation. I have mentioned these actions in a few blog posts here and I gave talks at APEX World 2018 and Kscope19 that covered actions. You may have some experience with them from working with Interactive Grid. It is an important concept that I should probably dedicate a blog post to.
Previously you could bind a button to an action by giving it a custom attribute called data-action and then defining an action object with
apex.action.add. This is great for buttons including custom buttons in the IG toolbar but there are many places in APEX where links are used as buttons or need to be used to invoke custom code. What people often really want is a way to invoke a Dynamic Action from a link such as a Card action or a report column link. We are not there yet but now you can bind an action to a link (anchor href). My hope is that in the future we will have unification of Dynamic Actions and the
actions interface such that DAs can be invoked from links and more. This is a step in that direction.
For any link enter the URL as:
Where action-name is the name of the action.
The full binding syntax has been extended to allow specifying the action context and passing arguments to the action. It is:
Where the context-id is the static id of a region and arguments are very much like URL parameters.
In the New API Features 22.1 app you will find these examples
This ‘Redirect to URL’ Action “button” will invoke the ‘update-status’ action passing in the ID column value as the id argument. The ‘update-status’ action is defined elsewhere on the page. In the past you might have defined the URL as
This Button with custom data-action attribute invokes the Interactive Grid built-in action ‘reset-report’ for the IG with region static ID ‘tasksIG’. There is no need to write any code because the button is just invoking a built-in action.
For Tree regions you can use this new binding syntax in the node link URL. This corresponds to the URL returned from
For menu widgets there are the new menu item properties
actionContextId that allow you to do the same things.
tabelModelView widget that is used in Interactive Grid so there are many options that are useful but not available declaratively.
The motivation for some of these other new APIs is probably not clear and maybe you will find them interesting.
callServer option and parameter has been around for a while but only documented this release. It is used in the new App Gallery to fetch the list of apps from GitHub using a client side request.
A few of the other enhancements came about from a new feature I’m working on that wasn’t ready in time for this release. These include: the ability to fetch multiple models at once, the client side filtering of models and views (which I started for the purpose of filtering the
treeView widget but this only works if using the undocumented ModelNodeAdapter), and the
offIcon properties of the action object and menu item (which isn’t shown in the sample app).
iterationCallback option to
apex.util.applyTemplate which is a powerful new feature that really deserves its own sample or blog post.
Just about everything shown in the sample app is a documented and supported API. The 3 exceptions are noted with comments that include how to accomplish the same with just supported APIs.