1

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.

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
Alfonso Vasquez
  • 598
  • 3
  • 10

1 Answers1

0

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.

Jimit Tank
  • 1,479
  • 5
  • 19
  • 25