I have a wizard in my Seam project which has four pages. When user starts the wizard by coming to the first page (wizard1.xhtml) I start a conversation. To do that in my pages.xml
I have following code.
<page view-id="/pages/wizard1.xhtml">
<begin-conversation join="true"/>
</page>
At the final page of the wizard (wizard4.xhtml) I have a save button and I end the conversation by using @End
annotation.
@End
public String save() {}
However while moving through the wizard, the user can redirect to a page outside the wizard by clicking a link. Note that if this happens the conversation is not yet ended.
What I want is to immediately end the conversation as soon as the user is no longer on a wizard page (wizard1.xhtml,wizard2.xhtml,wizard3.xhtml or wizard4.xhtml).
I found this post but a timeout is not a good choise in my case since I want to end the conversation immediately.