Hi Thomas,

This doesn't overwrite the existing history entry (http://mydomain.com/) it
just adds another entry with a bookmark. I'm trying not to have two entries
added when a user first goes to my site because the back button will take
them to http://mydomain.com and that will immediately take them back to
http://mydomain.com#Home (or whatever the default bookmark happens to be).

Cheers,

Ian



2009/3/29 Thomas Broyer <[email protected]>

>
> How about:
>                 String token = History.getToken();
>                if (token.length() != 0) {
>                        onHistoryChanged(token);
>                } else {
>                         onHistoryChanged(HIS_INTRO, true);
>                }
> which can also be written as:
>                 String token = History.getToken();
>                if (token.length() == 0) {
>                         token = HIS_INTRO;
>                }
>                onHistoryChanged(token);
>
> i.e. work as if the token were HIS_INTRO, even if it doesn't show in
> the URL; and use HIS_INTRO with History.newItem() to navigate to your
> "home page" because newItem() doesn't work reliably with an empty
> token.

--~--~---------~--~----~------------~-------~--~----~
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