Dominic--
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/-/gT9Oh2s-gK4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Why don't use DialogBox?
On Mon, Dec 17, 2012 at 12:28 PM, Dominic Warzok <dom...@googlemail.com> wrote:
Hey together,I try about a day to find an equvalent to the javascript confirm-dialog.
My problem is that when the user reload the webpage, he should get a dialog with a "Yes" and a "No" button where he can decide to only reload the page or to log off from the page.I found a jQueryUi Dialog but this dilog don't interrup the reload process.After this I found this Project but I can't call it from a native Method...Maybe someone of you know a solution ?Thanks in advance ;)
Dominic--
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/-/gT9Oh2s-gK4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
@Overridepublic void onWindowClosing( ClosingEvent in_event ){
boolean confirm = Window.confirm("Do you want to leave this Page?");
}
--
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/-/SF1pZcGHczIJ.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/YXi-A_OTOPcJ.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
If you don't use History, you can use jQuery/JavaScript. I guess this is the only solution. Do you really need this in your app project?
On Mon, Dec 17, 2012 at 1:19 PM, Dominic Warzok <dom...@googlemail.com> wrote:
No I' not using the history and in my opinon this is not necessary.The way this should go is.The user press "F5" or "Crlt + R" than the dialog should appear and the user can decide to log of or to continue the reloading of the page.So there is no need to use the history.
On Monday, December 17, 2012 1:13:11 PM UTC+1, Aldin wrote:
Are you try using History. Every time when user reload the page it is a new history token. Thean you can use this methods for reloading the entire page: com.google.gwt.user.client.Window.Location.reload() or com.google.gwt.user.client.Window.Location.replace(newURL);
On Mon, Dec 17, 2012 at 12:57 PM, Dominic Warzok <dom...@googlemail.com> wrote:
Yes if the user click on leave this page, he will be logged out of the application (Maybe redirect). If he click on stay the page will only be reload.
On Monday, December 17, 2012 12:55:27 PM UTC+1, Aldin wrote:So, you want to reload the page or redirect the user to another page if user click "Leave this Page". If user click "Stay on this Page" the Dialog have just to close?
On Mon, Dec 17, 2012 at 12:51 PM, Dominic Warzok <dom...@googlemail.com> wrote:boolean confirm = Window.confirm("Do you want to leave this Pa--To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/SF1pZcGHczIJ.
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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
Hey together,I try about a day to find an equvalent to the javascript confirm-dialog.
My problem is that when the user reload the webpage, he should get a dialog with a "Yes" and a "No" button where he can decide to only reload the page or to log off from the page.
Window.confirm()?
In that specific case, you'll want to Window.addClosingHandler and setMessage on the event.
--
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 unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
/**
* Ask user before stopping this activity
*/
@Override
public String mayStop() {
return "Please hold on. This activity is stopping.";
}
Hey
The 'proper' way to do the confirm dialog is to use the Activies and Places framework in GWT.
Thanks Thomas, clears it up.
As an aside, is there a way to work out which event the mayStop() is being called for? So you could decide whether to show the message if the user is closing the browser or navigating to Place A, but not if he is navigating to Place B?
eg. If the user is filling out a form and presses help we would want to save the form state and let him go there, but if the user is closing the form or navigating somewhere else in the webapp, we'd want to show him the message (to let him know he hasn't saved the form, etc)?