browser forward button does not respect mayStop

34 views
Skip to first unread message

Constantino

unread,
Mar 15, 2012, 3:32:10 PM3/15/12
to Google Web Toolkit
When I execute this app:

http://code.google.com/p/google-web-toolkit/downloads/detail?name=Tutorial-hellomvp-2.1.zip

I initially click on the "Say good-bye" link, then click on "OK" and I
see the "Good-bye" message.

Then I click on the back button to see the hello activity again.

This time instead of clicking on the link I click on the browser
forward button, it will:

- ask the message returned by the mayStop method
- before I click on ok or cancel the URL is already changed
- if I click cancel the URL will stay "http://127.0.0.1:8888/
hellomvp.html?gwt.codesvr=127.0.0.1:9997#GoodbyePlace:World!" but the
hello activity is still being displayed

Looks like a bug in GWT, isn't it?

Regards,
Constantino

Thomas Broyer

unread,
Mar 16, 2012, 5:30:16 AM3/16/12
to google-we...@googlegroups.com
It's not.

Using the forward button of your browser changes the URL to #GoodbyePlace:World!, which the PlaceHistoryHandler detects. Itthen calls your PlaceHistoryMapper to transform that to a Place and call the goTo. Even if you cancel the goTo, the URL has already been changed, as it was the initial trigger.
Reply all
Reply to author
Forward
0 new messages