2009/3/31 Thomas Broyer <[email protected]>
>
> So, when you first load the page without a hash/anchor, onModuleLoad
> calls setMenuByToken with values ("", "") and the menu system takes
> care of showing the "default" submenu
onModuleLoad calls History.fireCurrentHistoryState();
Well actually there's a routine to create the top-level menu and that does
it because the menu can be recreated if the user logs on or off, but at some
point all the menus are created and then History.fireCurrentHistoryState(); is
called.
This is picked up by the top-level menu here:
@Override
public void onValueChange(ValueChangeEvent<String> event)
{
setMenuByToken(event.getValue(), "");
}
and as you can see, it calls setMenuByToken, whether it has come from the
back or next button, or in this case the initial setup with or without a
bookmark.
and cascade the call to the
> submenu, which in turn takes care of showing the "default" submenu,
Only if the token is missing or wrong
If the menu has been shown before, it shows what was shown last time. if you
go here http://examples.roughian.com/#Panels~FlowPanel and then to Home, and
then back to Panels, you don't really want it reset to Intro again.
Especially if there are other submenus involved.
>
> etc. until a non-menu page is reached, which calls History.newItem
> (...)?
Only if the original token was not blank.
>
> (and in this case, you'd like to actually use Location.replace to
> *not* create an history entry?)
Only if the original token *was* blank.
>
> If I'm correct, then you should probably pass down a "is default" flag
> to setMenuByToken and only call History.newItem if !isDefault, i.e.
> change your framework a bit...
I don't need to. I already *know* when I need to use replace (the original
token is blank), and the code already does what it should (and did before I
posted) - the problem is, as originally stated in my first post, that...
Window.Location.replace() doesn't work in Safari or Chrome or Opera
and I'm looking for a fix or workaround.
Ian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---