On Wednesday, December 15, 2010 11:22:52 AM UTC+1, dom.jansen wrote:
>
> Hey,
>
> is there a way to implement hierarchical places in gwt 2.1?
>
> E.g. i want:
> http://www.myexample.com/foo/bar
>
> In gwt 2.1 i get sth like this:
> http://www.myexample.com#foo:bar
>
> Regarding some posts of Thomas Broyer and the GWTP team it looks like
> there is no direct way to use hierarchical places in pure gwt 2.1
> (e.g. 
> http://groups.google.com/group/gwt-platform/browse_thread/thread/4c00e59dc139ccdf?fwc=1
> ).
>

That was about activities, not places.
 

> Are there workarounds (without involving a third party lib)?
>
> Replacing ":" with "/" may work with a customized
> AbstractPlaceHistoryMapper. So maybe the parameters of a place can
> mock hierarchical places.
>

If you don't want the prefix:place-specific-token pair, then indeed you have 
to create your own PlaceHistoryMapper instead of relying on the generator 
(do not use AbstractPlaceHistoryMapper though, it's really made for the 
prefix/token approach, which is not really –really not?– "hierarchical")
With your own PlaceHistoryMapper, you're free to parse an serialize your 
places the way you want. What's left then is to define Place types that 
model your "hierarchy".

> But what about removing the "#" hashtag?
>

Theoretically you could pass an Historian to the PlaceHistoryHandler that 
uses HTML5's pushState/onpopstate, but then that requires you to also handle 
the URLs on the server-side, because when people will bookmark the URLs, the 
browser will then request the full URL to the server.
See https://developer.mozilla.org/en/DOM/Manipulating_the_browser_history

>

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