-
1. Re: the bookmarded url has conversationId when using redirec
norman.richards May 22, 2006 12:28 PM (in response to liudan2005)The conversation id isn't a huge problem. If the conversation doesn't exist, a new one is created. It is really just an issue of whether or not you find the conversationId distracting. (well, in theory it is a problem for us because the ids are non-random and conversation "17" might actually exist for another user - we should make the conversation ids long random numbers like an HTTP session id)
That being said, you can control the conversation id propagation using the s:conversationPropagation tag. (use "none" to make sure the links don't preserve the conversation) However, if you want to abandon the conversation, I wonder if you really wanted the conversation in the first place? Why not simply not create the conversation in the first place? -
2. Re: the bookmarded url has conversationId when using redirec
liudan2005 May 22, 2006 12:43 PM (in response to liudan2005)Thanks for reply.
Without creating a converstaion, how can I pass the objects between invocations? Here is what I've tried for my second approach by having 2 seperate beans:@Stateless @Name("shopAction") public class ShopAction ... { @RequestParameter String id; @Out(scope=Conversation) List items; public void showShop(){ items=getShopItems(id); } } @Stateful @Name("bookAction") public class ShopAction ... { @In(scope=Conversation) List items; @Begin public String buyNow(){ List selectedItem=getSelected(items); .... } }
The shopAction is unable to outject items because it's a stateless bean. When bookAction.buyNow() is invoked, it needs to inject items from previous operation.
In summary, I need a way to pass objects from stateless bean to a conversational stateful bean.
Any idea?