On 29 mar, 22:43, Ian Bambury <[email protected]> wrote:
> 2009/3/29 Thomas Broyer <[email protected]>
>
>
>
> > Am I clearer?
>
> I don't know. I know I'm not :-)
>
> OK. Where do you see this bit of code living?
>
> String token = History.getToken();
> if (token.length() == 0) {
> token = HIS_INTRO;}
>
> onHistoryChanged(token);
in your onModuleLoad (assuming your EntryPoint is your
HistoryListener, and you have a single HistoryListener).
Or you can do this:
public void onHistoryChanged(String token) {
if (token.length() == 0) {
token = "Home";
}
// do your history processing
}
and in onModuleLoad just call:
History.fireCurrentHistoryState()
(assuming you only have one HistoryListener, or you'll have to include
the same "if" code in all of them that care)
It all depends where your HistoryListener is located and if you have a
single or several listeners, but the key is: whenever you "get" the
empty string (History.getToken() == ""), do as if it were "Home".
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---