It seems that CloseHandler and Window.ClosingHandler() are not working
or are not triggering the events in the same way under IE as opposed
to Firefox.

         Window.addWindowClosingHandler(new Window.ClosingHandler() {

                    @Override
                    public void onWindowClosing(ClosingEvent event) {
                        event.setMessage(message);

                    }


         Window.addCloseHandler(new CloseHandler<Window>() {

                    @Override
                    public void onClose(CloseEvent<Window> event) {
                        //Window.alert("debug1");
                        if(recordId!=null){

                            DatabaseQueryServiceAsync dbQueryService =
DatabaseQueryService.Util.getInstance();
                            dbQueryService.releaseRecordLock(recordId,
new AsyncCallback<String>() {

                                @Override
                                public void onFailure(Throwable arg0)
{
                                }
                                @Override
                                public void onSuccess(String arg0) {
                                }
                            });
                        }
                    }
                });
                });


For example, the ClosingHandler under IE displays the message when I
swap a panel within within my widget. This does not occur in Firefox.

The CloseHandler doesn't seem to trigger at all when the window closes
in IE, but does so in firefox. The interesting thing to point out
there, is that when I put a Window.alert("debug1") message in the
addCloseHandler() method it DOES run the callback below, but as soon
as I remove it, the callback doesn't happen. In firefox it works and
runs the callback in both situations. So, I'm basically pulling my
hair out not really understanding what's going on. Any help would be
greatly appreciated.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to