Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Proper detection when a session ends in RAP?(e. g. sessions ends when the user closes tab or browserwindow...)
icon5.gif  Proper detection when a session ends in RAP? [message #517007] Thu, 25 February 2010 17:30 Go to next message
Eduard  is currently offline Eduard Friend
Messages: 29
Registered: September 2009
Junior Member
Hello RAP-Community!

I want to tidy up my application (remove observers and so forth) after a session ends.

From my perspektive a session ends if the user closes the browser window or a tab. A sessions also ends if a user reloads the rap page.

The problem is, that the a UI thread of a session is still running, even if the browser or tab have been closed. After a session end I want to tidy up the effected session parts of my RAP application.

There is the IExitConfirmation interface. But it's not working in every browser. It is also not possible to distiguish between tab close and tab change.

I also tried to register a listener to the display object to listen to Close and Dispose events. But nothing happens.

I'am running my applications SWT-like via the createUI-method:

while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}

		display.dispose();

		UICallBack.deactivate("callback" + this.toString());
		return 0;


Maybe somebody had the same problem and knows a work around?

Best regards
Eduard
Re: Proper detection when a session ends in RAP? [message #517022 is a reply to message #517007] Thu, 25 February 2010 13:52 Go to previous messageGo to next message
Rüdiger Herrmann is currently offline Rüdiger HerrmannFriend
Messages: 581
Registered: July 2009
Senior Member
Eduard,

did you read this?
http://wiki.eclipse.org/RAP/FAQ#How_do_I_get_notified_when_t he_browser_window.2Ftab_is_closed.3F
Also there are several posts on this newsgroup on the topic. The
newsgroup archive can be searched here:
http://www.eclipse.org/forums/index.php?t=thread&frm_id= 34
Though a web search will also do.

HTH
Rüdiger


--
Rüdiger Herrmann
http://eclipsesource.com

On 25.02.2010 18:30, Eduard wrote:
> Hello RAP-Community!
>
> I want to tidy up my application (remove observers and so forth) after a
> session ends.
>
> From my perspektive a session ends if the user closes the browser
> window or a tab. A sessions also ends if a user reloads the rap page.
>
> The problem is, that the a UI thread of a session is still running, even
> if the browser or tab have been closed. After a session end I want to
> tidy up the effected session parts of my RAP application.
>
> There is the IExitConfirmation interface. But it's not working in every
> browser. It is also not possible to distiguish between tab close and tab
> change.
>
> I also tried to register a listener to the display object to listen to
> Close and Dispose events. But nothing happens.
>
> I'am running my applications SWT-like via the createUI-method:
>
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
>
> display.dispose();
>
> UICallBack.deactivate("callback" + this.toString());
> return 0;
>
>
> Maybe somebody had the same problem and knows a work around?
>
> Best regards
> Eduard
Re: Proper detection when a session ends in RAP? [message #517175 is a reply to message #517007] Fri, 26 February 2010 13:51 Go to previous message
Eduard  is currently offline Eduard Friend
Messages: 29
Registered: September 2009
Junior Member
Thank you Rüdiger! I didn't looked in the faq. This is really helpful. Smile
Previous Topic:Existing RCP / RAP compatibility classes
Next Topic:[ANN] RAP 1.2.2 is available
Goto Forum:
  


Current Time: Tue Dec 07 22:11:41 GMT 2021

Powered by FUDForum. Page generated in 0.02361 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top