[jboss-user] [JBoss Seam] - Re: Nested Page flows (jpdl) and conversations

nthompson do-not-reply at jboss.com
Mon Jan 8 13:40:35 EST 2007


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

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3999165#3999165

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3999165



More information about the jboss-user mailing list