Monday, April 10, 2017

ADF Multi Task Flow Binding and Tab Order

I had a post while ago about ADF multi task flow binding and loading dynamic regions - Building Custom UI Shell with ADF 11g R2. In that sample, new region was opened in the first tab position. Meaning tab order was from right to left. It is more natural to have left to right tab opening order. This can be done too, check updated sample app - we need to control disclosed property and add new region to the end of array.

Sample app - Sample app contains four regions that can be opened dynamically. Let's say user opens region Locations:

With improved tab order, next region will be opened in the tab on the right (before it was on the left, in the first position):

Tab closing works in the way. Let's say user wants to close second tab:

When tab with Departments is closed, next tab on the right is opened - Employees tab:

Key thing in implementation for this requirement - disclosed property in dynamic tab:

It calls bean method, where it evaluates current tab to be disclosed. If given tab is matching the value - it will be disclosed. Disclosed property for all other tabs will be reset:

Each time when new tab is loaded, it is loaded to the end of the array. New tab is set to be disclosed:

When user selects tab - currently disclosed tab property is updated too, to make sure info about new disclosed tab is stored:

One more case - tab closure. When tab is closed - next tab is selected, unless current tab was the last one:

When tab is selected programmatically, we update information about current selected tab too:

No comments: