The Right Way™ is to handle the token at application start. If you use 
History, then call History.fireCurrentHistoryState() from your 
onModuleStart; if you use places, call handleCurrentHistory() on your 
PlaceHistoryHandler.
It's not only about "history" and the "back button", it's about making URLs 
to get you where you want/need within your app!

On Wednesday, October 17, 2012 8:03:25 PM UTC+2, lexl wrote:
>
> Hi,
>
> I have a simple stateless app, with what I hope is a simple problem, but I 
> can't find an answer.
>
> On the main page is a button (Foo), when you click the button the history 
> is updated with a new token #foo, and the url becomes myapp.com#foo.  So 
> far so good.
>
> When you hit refresh, GWT reloads the main page. No problem. However the 
> displayed url remains myapp.com#foo. and #foo continues to live in the 
> history stack, so that if I click the Foo button now, nothing happens. The 
> user stays on the main page.
>
> What's the right way to clear the history on a refresh or otherwise work 
> around this problem?  The questions and answers I've seen have all talked 
> about synching server state, refreshing javascript state, etc. I don't have 
> any of those issues, I just need to clear the history or otherwise make the 
> button work, even if the token is already at the top of the history stack.
>
> thanks.
>
>

-- 
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/-/UyhOK5zmN-EJ.
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