Maybe the easiest way would be to use JSON ?! It will look a bit
strange in the URL bar (all those brackets), but should work pretty
well.
I think Google should provide a default way (using IsSerializable
Interface) to store and restore objects. What do you think?


On 13 Okt., 00:40, Jens <[email protected]> wrote:
> While the prefix identifies the place, the token stores the internal state
> of that place.
>
> How to convert a place state into a string token is up to the developer by
> implementing the getToken() method of PlaceTokenizer. If a MyPlace has two
> state variables s1 and s2 you could create tokens like #MyPlace:s1=1&s2=test
> or #MyPlace:s1:1,s2:test ... (its really up to you). With some more complex
> customization you can also achieve hash fragments like #/myplace/1/test
> which look more like a typical url (a good example would be the current URL
> in your browser as the new Google Groups website is done with GWT).
>
> Well and the reverse way is also up to the developer. If someone visits your
> site viawww.domain.com/#MyPlace:s1=1&s2=testyou have to create a place
> based on the token (thats done in PlaceTokenizer.getPlace()). So you would
> split the token into its parts and construct a place "new MyPlace(1, test)".
> The Activity could then use the state information "1" and "test" to
> configure the view or to preselect something, etc.
>
> So basically its somehow like URL parameters but its much more customizable
> as everything happens inside the hash fragment of the URL.
>
> -- J.

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