Tuesday, March 9, 2010

Integration in Oracle ADF with ADF Task Flows and Dynamic Regions Navigation

Today one more post from Integration series. There is a case, when Dynamic Region might have navigation to another Dynamic Region. If user will open one region from another, menu selection should be refreshed accordingly. I'm describing how to do this, thanks to blog Reader who asked this question.

Download updated sample - ADFIntegrationRegions3.zip, based on my previous post. Main change comparing to previous post sample - there is ADF Task Flow call from Locations to Departments:

All separate applications are deployed and assembled into one main application, same as it was described before. Only one difference now - first Dynamic Region (Locations) contains Departments buttons, it will navigate to second Dynamic Region (Departments) directly:

User can click on Departments button:

And here we go - Departments Dynamic Region is opened, menu item selection is synchronized as well:

Well, how to implement this? There is a very good hint in Frank Nimphius and Lynn Munsinger book (Building RIAs w/ Oracle ADF) on page #201 RegionNavigationListener. We can declare it for af:region:

And listen for navigation from Locations to Departments, if such navigation happens - we reset menu and switch Dynamic Region (Departments) as current:

Its how it works.


Tiah said...

Hello Andrejus,

Thank you very much for your very useful ADF examples. The examples are very handy to learn many key concepts.

My client has the following requirement. They would like to use region+dynamic task flows concept to bring in different task flows based on some condition.

How one can pass parameters to each of these dynamically instantiated task flows in a region?

Appreciate your feedback,

Andrej Baranovskij said...

Hi Tiah,

You can enable this programatically, from the same dynamic task flow bean class. It should work.


Unknown said...

Hi Andrejus,

Thanks for the post. I am trying to work on a simpler than this. But not able to get it. I want to tell the button action from one region to another region. First region has two buttons and second region should display a screen based on the selection of the button in the first region.

I am using the following after raising the contextual event on the button in the first region.
public void receiveButtonEvent (ActionEvent actionEvent03){

RichCommandButton rcb = (RichCommandButton)actionEvent03.getComponent();
System.out.println("Action Text = "+rcb.getText());
String prAction =

I am not able to get the action. Is this correct?

Andrej Baranovskij said...

May be you are trying to implement it too complex. Why not to use just Input Parameter for fragment and to do PPR on that fragment?


Anonymous said...

Hi Andrejus,

Thanks for the post. I have a requirement where I need to display a static TF with a dynamic region. In the static TF, I have a view with 2 dropdown lists and based on the selection in these lists the dynamic region below should load the corresponding TF. But my problem is I dont want to use TF call activity as upon selecting any value from the list, the whole page would be replaced by dynamic region. I want to show the dynamic region with the two lists always. Am I correct in analyzing my solution.

Please guide.


Andrej Baranovskij said...

Yes..., I would suggest to use Managed Bean, you can pass dummy parameter through that Bean from static task flow and use it as parameter for Dynamic Task Flow. Set refresh ifNeeded - it will get reloaded.


Unknown said...

Hi Andrejus,

I am planning to call a bounded taskflow inside a dynamic region.

I have a panel splitter on left side and a dynamic region on right hand side.

For e.g. dept-fask-flow and emp-task-flow

We can do this by dragging and dropping the ADF region but I want to change the dynamic region programatically using a command button or ADF Rich Link. This is because i want to create application menus whose metadata and paths to task-flows are stored in database.

Your help would be really appreciated.

Ashish Man Baisyet

Andrej Baranovskij said...


Check this post: http://andrejusb.blogspot.lt/2010/02/integration-in-oracle-adf-with-adf-task.html