This content has been marked as final. Show 10 replies
your question isn't clear to be honest as the use case is not clear.
Use Case #1:
Have a home.jspx page that navigates to a page using the dynamic tab shell and launch a specific task flow in a tab
Use case #2:
Have a home.jspx page that navigates to a page not using the dynamic tab shell template and open a task flow in a region
Your question is not clear on which use case you are after. For Use case #1, pass a request parameter (e.g. attribute in requestScope) with the page request. On the page (that has the tabShell template) have a phae listener defined that i) after restore view accesses the request parameter and writes it to pageFlowScope ii) beforeRenderResponse reads the parameter from pageFlowScope and invokes the tabContext API to launch the task flow requested by the home.jspx page in a tab.
For use case #2 the scebario is similar but different. Here - because you don't use the tab shell template - you launch the task flow in a dynamic region. Again, you pass a request parameter and use a phase listener. However, you then access the managed bean (viewScope) controlling the dynamic region to set the task flow to display
use case 2': You want to work with a staticregion on the page you navigate to but want to show a specific view within the task flow. In this case you also pass a parameter with the request but use a router activity as the first activity in the task flow. The router then reads the paremeter and determine sthe view to navigate to.
So now you have all three possible variations and use cases that should get you going
Use Case #1 would be my case. Home.jspx does not use dynamic tabs and it contains quick links which would open pages with bounded task flow (with page fragments) that do use dynamic tabs.
So if I understand you correctly I would have to transfer parameter (task flow id to open?) to opening page and beforePhase method would read that page parameter and launch specific activity in Launcher.java by calling launchActivity()? But the problem is TabContext is null if I launchActivity() from beforePhase method.
What am I missing?
Oh, and thank you for your answer ;)
Please? Any help?
I get this error when trying to run _launchActivity in overriden beforePhase()
java.lang.NullPointerException: UIComponent is null
OK, is there no other way of opening a bounded task flow with page fragments in a page (which is using dynamicTabShell template) from other page that is not using dynamicTabShell template?
Maybe calling _launchActivity in beforePhase is completely wrong approach, because "java.lang.NullPointerException: UIComponent is null" is returned.