-
1. Re: Destroy (End) Conversation if the user leaving a specified page
nille Jul 10, 2009 3:45 PM (in response to ralf)Hi,
I have the same problem. Until now I used a combination of JavaScript and an action method to end an existing long running conversation. In my case, the long-running conversation should end if the user closes the browser window created by a
<s:link target="_blank"...
For that I used the onUnload event:
<body id="pgReportMain" onUnload="destroyConversation();">
and some lines of code down
<a4j:jsFunction name="destroyConversation" action="#{myAction.endConversation()}"/>
This calls the following action
@End public void endConversation() { log.info("Ending conversation: " + Manager.instance().getCurrentConversationId()); }
Unfortunately, this works fine for Firefox: I can click on the link, do some things in the popped up windows and close the window as often as I want without any problem (ok, I tried it for about 10 times). But I have a massive problem with the Internet Explorer. For IE this works exactly twice. After closing the popped up window for the second time, IE just does nothing. No respond to links, just nothing. I used fiddler2 (the web debugging proxy) and it seems that the IE does not even sends the (third) request.
Does anybody has an idea?
Kind regards,
Nille -
2. Re: Destroy (End) Conversation if the user leaving a specified page
amitev Jul 10, 2009 3:59 PM (in response to ralf)onunload don't seem to be a good solution. What if the desired page contains a postback form and i don't want to kill the conversation on postback?
-
3. Re: Destroy (End) Conversation if the user leaving a specified page
nille Jul 10, 2009 4:29 PM (in response to ralf)That's right. In my case it would be ok (if it would work with IE) because there is no postback form in it.
-
4. Re: Destroy (End) Conversation if the user leaving a specified page
kibojan Aug 29, 2011 1:52 PM (in response to ralf)I have the same problem... any new thoughts on this?
-
5. Re: Destroy (End) Conversation if the user leaving a specified page
konami.bankyaw.gmail.com Aug 30, 2011 8:23 PM (in response to ralf)May be you can start a new conversation every time you enter the page. I think you can achieve that with pages.xml. There are ways to force seam to start a new conversation for a particular page using pages.xml. I forgot the exact syntax.