[jboss-user] [JBoss Seam] - How to correctly start pageflows
mail.micke@gmail.com
do-not-reply at jboss.com
Wed Aug 8 09:33:08 EDT 2007
Hi
I've been experimenting with pageflows a bit and different ways of starting them, prefferably I would like to start it in a way which doesn't require a backing bean method.
This works for me:
|
| <s:link value="Start anno" action="#{dummyBacking.startPageFlowAnno}"/>
|
| @Begin(pageflow="test")
| public void startPageFlowAnno(){
| System.out.println("Trying to start the page flow via annotation.");
| }
|
|
But the following two doesn't (the first approach actually kills the webapp):
|
| <s:link value="Start comp params" action="#{dummyBacking.startPageFlow}" propagation="begin" pageflow="test"/>
| <s:link value="Start comp params" action="start" propagation="begin" pageflow="test"/>
| public String startPageFlow(){
| System.out.println("Trying to start the page flow via s:link parameters.");
| return "start";
| }
|
| <s:link value="Manual PageFlow start in code" action="#{dummyBacking.manualStartFlow}"/>
| public String manualStartFlow() {
| Pageflow.instance().begin("test");
| return "start";
| }
|
|
The pageflow definition:
|
| <pageflow-definition
| xmlns="http://jboss.com/products/seam/pageflow"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/pageflow http://jboss.com/products/seam/pageflow-2.0.xsd"
| name="test">
|
| <start-state name="start">
| <transition to="startPage">
| <action expression="#{dummyBacking.resetNumber}"/>
| </transition>
| </start-state>
|
| <page view-id="/pageflow/start.xhtml" name="startPage" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="subPage1">
| <action expression="#{dummyBacking.incNumber}"/>
| </transition>
| <transition name="ManualStartFlow" to="subPage2"/>
| </page>
|
| <page view-id="/pageflow/flow1.xhtml" name="subPage1" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="subPage2">
| <action expression="#{dummyBacking.incNumber}"/>
| </transition>
| <transition name="prev" to="startPage"/>
| </page>
|
| <page view-id="/pageflow/flow2.xhtml" name="subPage2" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="next" to="endPage"/>
| <transition name="prev" to="subPage1"/>
| </page>
|
| <page view-id="/pageflow/end.xhtml" name="endPage" no-conversation-view-id="/pageflow/start.xhtml">
| <redirect/>
| <transition name="prev" to="subPage2"/>
| </page>
|
| </pageflow-definition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4072022#4072022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4072022
More information about the jboss-user
mailing list