You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 7 Members of 4087 |
| Forum: Seam Users |
11. Jul 2008, 15:47 CET | Link |
How I end a nested conversation and start a new nested in the same action or redirect???
I'm trying this, but it doesn't work.
In Action:
@End(beforeRedirect=true)
public String saveAndNew() {
return save();
}
In pages.xml:
<page view-id="add.xhtml" login-required="true">
<navigation from-action="#{action.saveAndNew}">
<rule if-outcome="sucess">
<begin-conversation nested="true"/>
<redirect view-id="add.xhtml"/>
</rule>
</navigation>
</page>
You will need to start the new conversation after the redirect has occurred. When specifying beforeRedirect=true, the conversation is destroyed just prior to the redirect and a new temporary conversation will be created for add.xhtml. This conversation should then be promoted to long-running through a begin.
Hope that helps.
--------------------------------------------------
Check my blog to find announcements on Seam Framework: Experience the Evolution of Java EE