-
1. Re: Creating new conversation after the redirect from page action
morman Nov 24, 2009 6:09 PM (in response to morman)Heh, my code snippet doesn't looks like suppose to :)
<page> <action execute="#{component.action}" /> <navigation from-action="#{component.action}"> <rule if-outcome="success"> <redirect view-id="view.xhtml"/> </rule> </navigation> </page>
It should be well to have preview button :).
-
2. Re: Creating new conversation after the redirect from page action
zzzz8.zzzz8.netzero.net Feb 4, 2010 5:48 PM (in response to morman)Hi Michal,
Did you ever figure out this issue? I'm running into a similar issue right now where I'm trying to use a page action to determine the page the user will navigate to. Normally, I would want to do this via a POST action, specify a particular page to navigate to (and the page action would not ultimately determine the page to navigate to). But my issue is fairly similar. However, I'm trying to do some "unconventional" stuff on a portlet (Liferay/Seam/ICEfaces) and a user entering a URL with page parameters. I've experienced the same issue you have. My situation is slightly different because I'm using a portlet so I'm using a render rather than a redirect. I've tried starting a long-running conversation - but as you've experienced, Seam ignores this and creates new conversation scoped components. I've tried starting a long running conversation in *.page.xml and programatically via Conversation.instance().begin(). Actually, Liferay bombs out when I try to specify it as a long running conversation. -
3. Re: Creating new conversation after the redirect from page action
idyoshin Feb 4, 2010 8:32 PM (in response to morman)Well As I understood: SEAM has 2 types of conversations, and actually almost everything is SEAM is in CONVERSATION. If you haven't started long-running conversation SEAM creates temporal conversation in which it injects all components used in the current page, unless some action Moves the conversation from temporal to long-running conversational context, each component is recreated, like if they were in the PAGE scope.
you can simply add <begin-conversation join="true" /> in your original page (i.e. which the initial data inputed), and by default SEAM will prolongate your conversation through your navigation, unless you leave this conversational context with specifying different conversationId (cid by default) or anything else.
Regards,
Ilya Dyoshin.
-
4. Re: Creating new conversation after the redirect from page action
zzzz8.zzzz8.netzero.net Feb 5, 2010 1:53 AM (in response to morman)Hi Ilya,
I've actually tried before and it does not work. I'm testing the situation when a user enters the URL manually on the browser location bar... The conversation scoped component set in the page action doesn't seem to be propagated...
-
5. Re: Creating new conversation after the redirect from page action
idyoshin Feb 5, 2010 5:20 AM (in response to morman)are you starting a long-running conversation in the page where user enters?
for my application I'm adding <begin-conversation join="true"/> to almost every page from CRUD interfaces (maybe wrong design but it works, and there is small amount of users for application). the only pages which don't have that - are those involved in pageflows. Thus users can resend the urls each-other and everything works fine !
-
6. Re: Creating new conversation after the redirect from page action
zzzz8.zzzz8.netzero.net Feb 5, 2010 5:29 PM (in response to morman)Yep, I'm starting a long-running conversation.
I did notice a very important point though. I tried a few things - and it looks like it's failing for me when I try to inject and outject a Home object. However, if I inject/outject a non-Home object, then it's OK. I'm thinking I must be doing something silly or I'm overlooking an important concept. Here's a sample snippet I'm testing:
@In(create=true) @Out private ItemHome itemHome; public void pageAction { itemHome.setId(1L); }
Is there something with Home objects and their invocation/injection/outjection in page actions I should know about - and is there a limitation in a portlet environment (Seam/ICEfaces/Liferay)?