This content has been marked as final.
Show 3 replies
-
1. Re: Nested Page flows (jpdl) and conversations
norman.richards Jan 6, 2007 2:49 AM (in response to nthompson)I'm not entirely sure I'm following, so I'll start with the obvious and see where it goes. Supposing that you start your nested conversation like this:
@Begin(nested=true,pageflow="two") public void doSomething() { ... }
Flow "two" just needs to start with a start-state:<pageflow-definition name="two"> <start-state name="start"> <transition to="node1" /> </start-state> <page name="node1" view-id="/page.xhtml"> ... </page>
That will start a nested conversation and take you to "/page.xhtml".
Is that what you were asking, or did I misread the question> -
2. Re: Nested Page flows (jpdl) and conversations
nthompson Jan 8, 2007 1:40 PM (in response to nthompson)No -- I think that I wasn't clear :)
So here is what I'm trying to do:
I'm trying to start a new page flow from within an existing flow using jpdl and not from an h:commandLink directly. I'm trying to keep page flow entirely confined to jpdl.
I have a login page flow defined like so:<?xml version="1.0" encoding="UTF-8"?> <pageflow-definition name="login"> <start-page name="start" view-id="/loginLanding.xhtml"> <description>Select Module</description> <redirect/> <transition name="BILLINGMANAGER" to="billing"> <action expression="${bMgrAccount.begin}"/> </transition> [ ... other module transitions defined ] </start-page> <page name="billing" view-id="/Billing_Manager/selectAccount.xhtml"> <description>Billing Manager</description> </page> </pageflow-definition>
My loginLanding.xhtml looks like this:<h:form> <ul> <ui:repeat value="${userManager.roles}" var="role"> <li><h:commandLink action="${role.roles.getFlowname}">${role.roles.description}</h:commandLink></li> </ui:repeat> </ul> </h:form>
And the billing flow is:<?xml version="1.0" encoding="UTF-8"?> <pageflow-definition name="bmgraccount"> <start-page name="selAcct" view-id="/Billing_Manager/selectAccount.xhtml"> <redirect/> <description>Select Account</description> <transition name="displayView" to="targetAction"/> </start-page> [ other transitions and pages not shown] </pageflow-definition>
So for the Billing module, the Flowname for the commandLink action would be "BILLINGMANAGER". The login jpdl then calls the bMgrAccount.begin method, which looks like:@Stateful @Scope(ScopeType.CONVERSATION) @Name("bMgrAccount") public class BMgrAccountBean implements BMgrAccount { @Begin(join=false, nested=true, pageflow="bmgraccount") public void begin() { } [ other methods not shown] }
Here's the problem:
The user selects the billing module from the login landing page. In the login page flow the bMgrAccount.begin action is called and starts a new (nested) conversation and the bmgraccount page flow. However, the page that is displayed is the destination node from the login flow, not the <start-page> of the bmgraccount flow. This is, I suppose, OK up until the point that the user switches conversations back to the login flow. When the user does this, they are taken back to the the selectAccount page (b/c that is the last destination node of the login flow). What I would like to happen is for the loginLanding page to be displayed when the user switches conversations.
I guess it comes down to whether or not it is possible to do what I want to do from within the jpdl files, or if I have to use the commandLink action attribute to directly call @Begin methods?
Hope this was a little more clear. Thanks for any insight you can give me!
Nate -
3. Re: Nested Page flows (jpdl) and conversations
kooudy Apr 12, 2007 9:27 AM (in response to nthompson)Please, did you solved this scenario?
What to define as target node "to" which is in different jpdl file (nested pageflow)?