-
1. Re: Determining Which Conversation You're In
schlegel Apr 19, 2008 2:26 PM (in response to darthmaul)Hi
Look at the reference manual
Components for controlling conversations....
org.jboss.seam.core.conversation.getId()
-
2. Re: Determining Which Conversation You're In
andygibson.contact.andygibson.net Apr 19, 2008 5:24 PM (in response to darthmaul)Yes, I have the same problem coming up soon.
In my mind, I have it planned out such that I will use page flows to navigate around. This means that when you are done with the search page, you will also know which page to go back to. Consider the same scenario with a person search which could be called up from a number of different pages.
In the page flow, when you make a transition (from order page to widget search) you can call an action method on the widget search bean that will set a flag which will indicate that this page allows you to add the item to the cart. In the widget search page you will only render the add to cart button if the flag is set. Once that method to add to the cart is called, the page flow can direct you back to the order page.
This way you don't need to know which conversation you are since if a pageflow is tied to the conversation you won't even have to worry about it. That's the beauty of Seam coming with all these cool libraries out of the box and already integrated.
As an FYI, regarding your original question, you can get the current conversation in a bean using :
@In private Conversation conversation
or in code using :
Conversation.getInstance()
Cheers,
Andy