-
1. Re: Problems retrieving nested conversation id
jacob.orshalick Nov 8, 2007 9:12 AM (in response to ng.tech)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. -
2. Re: Problems retrieving nested conversation id
ng.tech Nov 8, 2007 10:42 AM (in response to ng.tech)Hey,
Ok perfect, thanks a lot for the explanation. I'm still currently learning the framework and there is a lot to read.
Regards,