| Re: [rap-dev] Are there any ways to be notified of user event: close a browser tab. |
Hi,
HTH Rüdiger
Hi all,There is no reliable way to get notified when the browser window/tab is closed.
I am new to RAP and I got a question, Are there any way to be notified of user event on closing a browser tab.
This is the recommended way if you want to be notified when a session is invalidated.I am working on a RAP platform (version: 2009.3.19) I want to be notified when user close a tab or the entire browser window. I have tried these:
* Add a SessionStoreListener and implement its beforeDestroy method to the ISessionStore instance returned from RWT;
* Add a WorkbenchWindowListener and implement its windowClosed method to the current workbenh;I am not aware of a malfunction of these mechanisms. Feel free to file a bugzilla if you can reproduce the problem.
* Add a WorkbenchListener and implement its preShutdown method to
the active workbench window.
None of them functions properly (Firefox 3.0.9)
But the beforeDestroy and preShutdown will be invoked when I come back to the link later.
By the way , I shifted from M5 to the current version. On M5 beforeDestroy and preShutdown are invoked on closing the tab (not on revisit the link). It seems the two versions behave differently without any changes on source code.
I guess that there will be other way out. I might try M7 when it is available.
Thanks in advance.
------------------------------------------------------------------------ 网易邮箱,中国第一大电子邮件服务商 <http://email.163.com>
------------------------------------------------------------------------
_______________________________________________ rap-dev mailing list rap-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/rap-dev