I've been working with Seam recently and temporary conversations still confuse me.
In our project we're using ExternalContext.redirect()
to redirect the user to the response page. From what I've read, a Seam conversation ends when the render response phase is called.
But then I read somewhere else that: Seam transparently propagates the conversation context (including the temporary conversation context) across JSF postbacks and redirects .
So what happens when I redirect to the same page is that commandLinks have the same conversationId appended to its action url always. I've tried to end the temp conversation with <f:param name="conversationPropagation" value="none"/>
, as the page says, but that causes that when the redirected page is rendered, the conversation context is already fred and a bean we where using can't be no longer used in the response.
So what I want to know, is that if there's a way to end the conversation with a redirect and mantain the context until the rendering of the response?
If not, when does a temp conversation really end? Because since the conversation context is propagated through redirects and postbacks, then it seams to me it will never end.
I thing CONVERSATION scope is automatic maintain by a SEAM Frame work throw UI if you want to create a new conversation then you can do like this.
<h:commandButton id="conId" value="New Conversation"
action="#{conversationManager.clearConversation('/views/Hello.seam')}">
</h:commandButton>
i am not sure but if you want to close a CONVERSATION then you can try like this.
getConversation().end();
i am not sure it will work or not.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.