hello,
i've recently started using jPDL pageflows in Seam 1.2.1.GA and have gone by the book
in ending a pageflow:
<page name="recommendation-complete"
view-id="/recommendations/complete.xhtml">
| <redirect/>
| <transition name="overview" to="rec-overview"/>
| </page>
|
| <page name="rec-overview"
view-id="/recommendations/recoverview.xhtml">
| <redirect/>
| <end-conversation before-redirect="true"/>
| </page>
i want to end the conversation before the redirect to recoverview.xhtml because that page
has a backing stateful session bean that has a starts a conversation on page load via a
@Begin(join=true) annotation in it's init() method.
however, i'm finding that since the schema requires that <end-conversation>
element has to come after the , recoverview.xhtml is being loaded with the pageflow's
long-running conversation still active. a browser refresh does clear out this
conversation state.
i can get this to work if i explicitly call a method annotated with
@End(beforeRedirect=true) _before_ making the transition in the pageflow:
| <page name="recommendation-complete"
view-id="/recommendations/complete.xhtml">
| <redirect/>
| <transition name="overview" to="rec-overview">
| <!-- method below is annotated @End(beforeRedirect=true)-->
| <action expression="#{myBean.endConversation}"/>
| </transition>
| </page>
|
| <page name="rec-overview"
view-id="/recommendations/recoverview.xhtml">
| <redirect/>
| </page>
in this case, the long-running conversation associated with the pageflow ends before
recoverview.xhtml is loaded, which is the intended behavior.
however, the approach above is less than desirable because it requires me to make the call
to #{myBean.endConversation} on all applicable transitions rather than encapsulating it in
the pages that I have designated as end states. is there another way to accomplish this
and/or am I misusing conversations by mixing pageflows that redirect to pages that
themselves are associated with (new) conversations?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071628#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...