-
1. Re: Begin conversation
cash1981 Jul 19, 2009 1:26 PM (in response to mvlach)I think the reason why back here wont kill your component is because you are not performing a redirect. For the conversation to end, a redirect must occur, and maybe this doesnt happen for you here?
You can however manually leave the conversation. Instead of annotating, try using:
Conversation.instance().end(); //Flag this conversation for ending Conversation.instance().leave(); //Leave this conversation (forces new temporary converation to start
If this doesnt work, try to force a redirect manually either in pages.xml or with
Manager.instance().redirect(...)
-
2. Re: Begin conversation
cash1981 Jul 19, 2009 1:31 PM (in response to mvlach)<blockquote>
_Miloslav Vlach wrote on Jul 18, 2009 22:52:_<br/>
When the component exists the @Create method is not invoked. And when don't exist, the new conversation is stared - it is truth ?
</blockquote>
If the component is already in scope, meaning long running conversation, session or application then the @Create method will not be invoked because the component already exsist.
The long-running conversation is invoked when you get to the @Begin. You can still have a Conversation component, but not long-running. A long-running will be alive until @End or timeout. However a conversation scoped component (not long-running) survives one redirect.
@ScopeType.EVENT = Goes from Restore View to Render Response, but not redirect
@ScopeType.CONVERSATION = Goes from Restore VIew to Render Response, and redirect. If long-running conversation, then it spans multiple JSF life cycles.
@ScopeType.SESSION = Access to session scoped components are serialized -
3. Re: Begin conversation
cash1981 Jul 19, 2009 1:32 PM (in response to mvlach)Sorry formating got lost. Here is with formating
Miloslav Vlach wrote on Jul 18, 2009 22:52:
When the component exists the @Create method is not invoked. And when don't exist, the new conversation is stared - it is truth ?If the component is already in scope, meaning long running conversation, session or application then the @Create method will not be invoked because the component already exsist.
The long-running conversation is invoked when you get to the @Begin. You can still have a Conversation component, but not long-running. A long-running will be alive until @End or timeout. However a conversation scoped component (not long-running) survives one redirect.@ScopeType.EVENT = Goes from Restore View to Render Response, but not redirect @ScopeType.CONVERSATION = Goes from Restore VIew to Render Response, and redirect. If long-running conversation, then it spans multiple JSF life cycles. @ScopeType.SESSION = Access to session scoped components are serialized
-
4. Re: Begin conversation
mvlach Jul 19, 2009 1:44 PM (in response to mvlach)
I think the reason why back here wont kill your component is because you are not performing a redirect. For the conversation to end, a redirect must occur, and maybe this doesnt happen for you here?In .page.xml is for retOutcome redirect... So the redirect is performed.
If the component is already in scope, meaning long running conversation, session or application then the @Create method will not be invoked because the component already exsist. The long-running conversation is invoked when you get to the @Begin. You can still have a Conversation component, but not long-running. A long-running will be alive until @End or timeout. However a conversation scoped component (not long-running) survives one redirect.When I have component for only one page and is Conversation scoped I don't need to use @Begin ? And until the page is accessed the component is live ?
In many requests ?Thanks you Shervin,
Mila
-
5. Re: Begin conversation
cash1981 Jul 19, 2009 5:12 PM (in response to mvlach)
Miloslav Vlach wrote on Jul 19, 2009 13:44:
When I have component for only one page and is Conversation scoped I don't need to use @Begin ? And until the page is accessed the component is live ?
In many requests ?As I said, a conversation scoped component will survive a redirect, and long-running (@Begin) will survive multiple JSF life cycles. So no, if you have a conversation scope you dont need @Begin if it is only for one request and redirect, but if you need for many requests, then you need @Begin.
But try to add
@Begin(join=true)
on your method. That might fix the problem.