I experienced such strange ADF behavior regarding navigation using task-flow actions. Navigation doesn't work after single button press. After second press - works fine.
- Application "MyApp" with two pages - main.jspx and popup.jspx (You can download sample app)
- popup.jspx belongs to bounded task-flow
- main.jspx belongs to unbounded task-flow
- Action "open" is defined in unbouded task-flow (see picture below)
- CommandButton which executes action "open" is placed in main.jspx - it should open popup.jspx as inline dialog
- In web.xml as main.jspx is configured to be welcome file (see picture below)
What did happen here? Right after request application is forwarded to welcome file - its main.jspx. After button press action was not executed because its real source name (displayed in browser URL - "main.jspx") was not the same as defined in task-flow ("main"). A bit strange, but ADF behaves like this - if there is such mismach it does't execute an action. But... Refreshes URL to one which conforms requirements. Need to remember specific ADF navigation behavior that in browser address bar shows URL of previous page, not the current one. Thats why in step2 we see the same main.jspx and just in step3 - see refreshed to "main".
- Open application URL=http://localhost:7101/MyApp. Application is automatically redirected to URL:
Pay attention to red-colored file name.
- Press button "open popup". After first press nothing happen except browser URL changes to:
- Press button "open popup" once again. Now popup is shown and browser URL changes to:
To fix this (make button working right after the first click) available two solutions:
This case was tested in ADF 18.104.22.168.
- Rename view name in unbouded task flow "main" -> "main.jspx"
- Change welcome file in web.xml "/faces/main/main.jspx" -> "/faces/main" (this case is implemented in my sample application available for download)
Labels: ADF, ADF Task Flows