04 – Basic page navigation

04 – Basic page navigation

Prepare new application

Prepare clean ADF application workspace and open your unbounded TaskFlow (adfc-config.xml).


Creating pages

Add three sites inside: mainPage.jsf, pageOne.jsff and pageTwo.jsff


Double click on each for create every page.



On the main page add page label (outputText) on the top and button “Page One” in the “Content” facet. To do this just drag the controls from Components and drop to Structure Viewer.


On the second page add two buttons “Main Page” and “Page Two”. On the last one: “Main Page” and “Page One”. Remember about page labels.

After that your pages should look similar like below.


Define Control Flow cases

It’s time to add some navigation to our application. Open adfc-config.xml and connect using “Control Flow Case” activity each page like below.


Now open each page and set “action” property for every button ie. on mainPage set “action” to “goOne”.


Testing navigation

If you’ve done everything properly your application is ready for testing.


Simplify navigation

If you see on your adfc-config.xml file, you see it’s little complicated. Let’s simplify control flow cases by using “Wildcard Control Flow Case”. Wildcard means, that the “case” is accessible from any page in the taskFlow.

In this case the mainPage is accessible from any other, so let’s change  navigation. Just add Wildcard activity and Control Flow Rule from Wildcard to mainPage like below.


Test the application one more time.

There should be no difference in application behavior, but it is much easier to understand.

Leave a Reply

Notify of