ADF Dynamic Regions Switching - Just the Basics

The ability to switch the content in a region in a Web page is one of the key features of ADF. It enables a Single Page Interface type of applications - an application where you get into a Web page and never have to leave or refresh the whole page - the content of the page changes based on the context of the work you are doing.

I was looking for a simple way that will explain this concept to people and while I found several blogs that cover this topic, and of course the extensive online ADF TaskFlow ADF Insider sessions cover this, I wanted something that will show the concept in a 5 minutes demo.

 So here we go - a quick video that shows you how to switch the content of a part of your page dynamically:

The ingrediants are two bounded taskflows using page fragments. The rest is all done automatically by JDeveloper and ADF. One important note at the end of the demo talks about the scope you should assign to the bean that controls the content of the region.


Thank you for the interesting demo

I just want to know if it is possible to replace the links on the left side by a hierarchical tree with links

thank you in advance

Posted by guest on August 16, 2011 at 12:45 AM PDT #

guest - you should be able to use tree with the nodes showing up as links as well - the links would just need to execute the value change for the region being used - exactly like the regular links.

Posted by Shay on August 16, 2011 at 04:17 AM PDT #

I tried to convert the link left menu tree, but I could not do it, I have not found either online demo showing how to make hierarchical arborescnces ...
So if you can show us how to create this hierarchical arborescnces.

thank you in advance

Posted by guest on August 18, 2011 at 11:57 PM PDT #

guest, there is no miracle here - you need to have a model for the tree and create the tree based on that, one of the fields in the tree model can be the names of the regions you want to show.
Then in the tree, convert the nodes to be links and hook up their action a method in the managed bean that does the switching of the region based on the value of the row in the tree.

Posted by Shay on August 22, 2011 at 06:54 AM PDT #

Great video, thanks. Lets say that one of these page fragments holds table for query only data and there is a button to navigate to edit page. Is it possible to call another jsf page from one of page fragments?

Posted by guest on November 02, 2011 at 12:42 AM PDT #

guest, Yes it is possible - If your region contains a taskflow that has navigation defined in it, you can do the full navigation of the taskflow inside the region.
If you want to navigate the parent page from inside the region see the parent action option:

Posted by guest on November 02, 2011 at 12:56 AM PDT #

Dear Mr.Shay ,

i want to ask how to build dynamic menu driven from database .

Thank you .

Posted by guest on March 30, 2012 at 07:35 PM PDT #

Hi Shay,

I built the dynamic regions for employee and department table, and used a tree on left side to flip between the department and employee on the center panel. Clicking on any 'Locations' node on the tree shows the departments on the center and clicking on the 'department' node shows the employees table in the center. All this is working fine. However I also wanted to implement the drag and drop from the table to the tree. I tried putting the 'dragSource' in 'table' for dept/emp in the individual jsff files having the respective tables. And the 'dropTarget' as well as 'collectionDropTarget' in the parent tree. However the dropListener method of the method is not even getting invoked when I drop any table row to the tree node.

Just wondering is there is something wrong which I am doing? The drag and drop works fine if the table is a static one (without dynamic region), but then we need a dynamic table so that the contents (and columns) can be flipped based on the tree node. To achieve the latter, having dynamic option looked like the best approach, but then it is now causing the drag and drop not working. Any ideas?


Posted by guest on May 28, 2012 at 03:04 AM PDT #

Sachin - see if this helps:

Posted by Shay on May 29, 2012 at 11:56 AM PDT #

Thanks Shay... yeah the issue was my mistake for not setting the discriminant properly.


Posted by Sachin on June 03, 2012 at 10:08 PM PDT #


I am here with an entirely different question, I want to create a tree view that is dynamic. Is it possible to do this in ADF if the branches and nodes are dynamic. I want to create a user permissions till the control level of each page.

Posted by Anil on January 30, 2015 at 06:16 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

I'm a Director of Product Management for Oracle's Cloud Development Tools and Frameworks.
Follow me:

« July 2016