Monday, December 17, 2012

Re: Equivalent to javascript confirmdialog ind GWT

Thank you :) Can you show us your solution :)


On Mon, Dec 17, 2012 at 4:59 PM, Dominic Warzok <domi1wa@googlemail.com> wrote:
I have fixed it :-) 

A lot of  thanks to Aldin, for your Ideas and your help. 

And  also to Thomas you have shown me the right way ;-) 

The solution is: There is a closingEvent which is be called when someone want to close the window. 

And there is a CloseEvent which is called when the window realy be closed. 

So my Question is be implementd in the onWindowClosing method and my logoutcode in the onClose method 


Thanks for your help 


On Monday, December 17, 2012 4:41:41 PM UTC+1, Dominic Warzok wrote:
Yeah that's nice it's something we are looking for. But how do I interupt the thread.

I have implemented this in my webapp but now if the user reload the Page he will also be logged out when he click on "Stay".

Maybe I can attatch a callback or so ? 



On Monday, December 17, 2012 4:08:01 PM UTC+1, Thomas Broyer wrote:


On Monday, December 17, 2012 3:50:44 PM UTC+1, Dominic Warzok wrote:
Window.confirm()?

We use this at the moment but there you can't change the buttons. In this confirm Dialog only "OK" or ´"Cancel" is avaible.

In that specific case, you'll want to Window.addClosingHandler and setMessage on the event.

We also have this handler added and it works well. Butt what do you mean with "setMessage"?


"Set the message to a non-null value to present a confirmation dialog that asks the user whether or not she wishes to navigate away from the page." 

This is standard JS, the browser is left in control of how exactly it displays the message, but that's the only way to possibly prevent an "unload" of your app.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/tTgcYhTkOc0J.

To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment