[jboss-user] [JBoss Seam] - Re: Starting arbitrary jPDL pageflows from a

IGx89 do-not-reply at jboss.com
Thu Aug 16 13:11:32 EDT 2007


Well, I found out that Seam does allow multiple elements inside a root element, but only if they're in the right order! For instance, this doesn't work:

  | 	        <rule if-outcome="FP1">
  | 	            <redirect view-id="page1.xhtml" />
  | 	            <begin-conversation join="true" pageflow="PF1" />
  | 	        </rule>
  | 
but this does:

  | 	        <rule if-outcome="FP1">
  | 	            <begin-conversation join="true" pageflow="PF1" />
  | 	            <redirect view-id="page1.xhtml" />
  | 	        </rule>
  | 

So, with that discovery, I was able to greatly reduce the configuration needed, to the point that I'm pretty much satisfied now :). Only unfortunate things are that I still need a controller JavaBean to force the navigation rules to be evaluated on page load and that beginning a pageflow doesn't automatically redirect to its start-page.

The solution:

  | 	<page view-id="/controller.xhtml" action="#{controller.getFlow}">
  | 		<param name="flow" value="#{controller.flow}" />
  | 
  | 	    <navigation>
  | 	        <rule if-outcome="PF1">
  | 	            <begin-conversation join="true" pageflow="PF1" />
  | 	            <redirect view-id="page1.xhtml" />
  | 	        </rule>
  | 	        <rule if-outcome="PF2">
  | 	            <begin-conversation join="true" pageflow="PF2" />
  | 	            <redirect view-id="page1.xhtml" />
  | 	        </rule>
  | 	        <rule if-outcome="PF3">
  | 	            <begin-conversation join="true" pageflow="PF3" />
  | 	            <redirect view-id="page4.xhtml" />
  | 	        </rule>
  | 	    </navigation>
  | 	</page>
  | 

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

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



More information about the jboss-user mailing list