GWT RPC possible in window closing handler? -


i'm listening window close event:

closehandlerreg = window.addclosehandler(new closehandler<window>() {   @override   public void onclose(closeevent<window> event) {     // ...   } }); 

the documentation says no ui can shown in callback. gwt rpc calls? i'm trying make one, isn't showing on server (either in breakpoints or log statements).

problem gwt rpc asynchronous , calls rpc services return immediately. in case window closed before browser has chance send underlying xmlhttprequest.

if it's absolutely necessary should able hand-craft calling sort of servlet (not gwt rpc) "synchronous" xmlhttprequest. have here example: http://weblogs.asp.net/bleroy/archive/2005/12/15/433278.aspx

but shouldn't doing of sort in window.onunload or window.onbeforeunload (these underlying dom events closeevent , closingevent window. perhaps there better way trying do.


Comments

Popular posts from this blog

jasper reports - Fixed header in Excel using JasperReports -

media player - Android: mediaplayer went away with unhandled events -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -