On Monday, January 16, 2012 3:10:33 PM UTC+1, Cristian Rinaldi wrote:
>
> Thanks thomas!!! 
> But as an internal navigation menu, I think it is best to use Hyperlink.
>

Let me disagree.

The only (the one and only) difference is that with Hyperlink you update 
the history token and let the PlaceHistoryHandler handle the change and 
call the PlaceController with the deserialized Place; instead of changing 
Place which will trigger the PlaceHistoryHandler to update the history 
token.
What it means in practice is that the PlaceChangeRequest event is 
dispatched *after* the history token has changed when using an Hyperlink 
(which uses Histoy.newItem), but before it when using PlaceController.goTo; 
so if an activity returns a non-null value from its mayStop and the  user 
cancels the navigation, the history token has already been changed.

It's best to always use PlaceController.goTo, even if that means making 
your own "PlaceHyperlink" widget (feeding it with the Place to go to and a 
PlaceHistoryMapper –to build the link's href out of the Place, in case the 
user wants to "open in new tab"–).

-- 
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/-/6YlKYHh5jH4J.
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