[jboss-user] [JBoss Seam] - Re: Problems retrieving nested conversation id
do-not-reply at jboss.com
Thu Nov 8 09:12:51 EST 2007
You have to understand the semantics of @Begin here. The @Begin annotation does not start a long-running conversation until the method execution completes. In your case the nested conversation will always begin as your return type is void, but if you were to have a String return type (for navigation) only a non-null return value would start the conversation.
The first case works because Seam always begins a temporary conversation if a long-running conversation is not in progress. Then if @Begin is encountered on a method and the method is void or returns a non-null value the conversation is *promoted* to long-running after method execution.
So to answer your second question, in order to retrieve the nested conversation id, of course the conversation must be in progress...
If your method needs access to the id you could either programmatically begin the nested conversation and then get the id, begin the conversation through s:conversationPropagation in the view, or begin the nested conversation through pages.xml navigation rules (my preferred approach).
Each of these approaches are described in the documentation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102908#4102908
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102908
More information about the jboss-user