Solved my own problem. I want to add a closingHandlr and not a
closedHandler and if event.setMessage() is set to a non-null value, a
confirmation box is displayed and hitting the CANCEL button cancels
the close.  My if statement to checked logged in status controls
whether I set a message or not and so resolves my problem.

-- Rob

On May 29, 4:28 pm, Rob Tanner <[email protected]> wrote:
> Hi,
>
> I want to capture a window close event and if the user is still logged
> in, present a confirmation box and then abort the close if the user
> hits the cancel button.  What I don't know how to do is abort the
> close.
>
>   Window.addCloseHandler(new CloseHandler() {
>     public void onClose(CloseEvent event) {
>       if (membershipData.isLoggedIn())
>         if (!Window.confirm("Are you sure?")) {
>
>           THE USER HIT CANCEL, SO WHAT DO I DO HERE?
>
>         }
>      }
>  });
>
> Thanks,
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to