[jboss-user] [JBoss Seam] - Pageflow recurence
blabno
do-not-reply at jboss.com
Wed Jan 23 16:18:16 EST 2008
I have following pages :
1)/locations/browseLocations.jspx
2)/locations/addCountry.jspx
3)/locations/complete.jspx
I want to add country to DB. So I place button on browseLocations.jspx :
<s:button value="Add" view="/locations/addCountry.jspx"/>
Now the page flow should start. But when there is a problem during countryCreator.addCountry method invocation, then I want to stay on addCountry.jspx but if I write transition to /locations/addCountry.jspx then I get Exception :
ERROR [SeamPhaseListener] uncaught exception
| java.lang.IllegalStateException: begin() called from long-running conversation, try join=true
addCountry.jpdl.xml
<?xml version="1.0"?>
| <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="addCountry">
|
| <start-page name="addCountry" view-id="/locations/addCountry.jspx">
| <redirect/>
| <transition name="next" to="evaluateSuccess">
| <action expression="#{countryCreator.addCountry}" />
| </transition>
| <transition name="cancel" to="cancel"/>
| </start-page>
| <decision name="evaluateSuccess" expression="#{countryCreator.error}">
| <transition name="false" to="complete"/>
| <transition name="true" to="addCountry"/>
| </decision>
| <page name="complete" view-id="/locations/complete.jspx" no-conversation-view-id="/locations/browseLocations.jspx">
| <redirect/>
| </page>
| <page name="cancel" view-id="/locations/browseLocations.jspx">
| <end-conversation before-redirect="true"/>
| <redirect/>
| </page>
| </pageflow-definition>
pages.xml
<pages>
| <page view-id="/locations/addCountry.jspx">
| <begin-conversation pageflow="addCountry"/>
| </page>
| </pages>
Now, if I cut out everything from pages.xml then there is no conversation at all, and I cannot add anything, nor can display FacesMessages.
Is there other solution than introducing <start-state> and inserting method annotated with @Begin(pageflow="addCountry") in countryCreator bean ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122805#4122805
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122805
More information about the jboss-user
mailing list