I also have a Places / Token question and as this thread topic is a more 
general I post it here.

First of all I do not like the default PrefixAndToken implementation and I 
would like to have place history tokens like the ones here in the new google 
groups app (#!place-name/group-name/thread-id). Is this possible with the 
default implementation of PlaceHistoryMapper or do I have to write my own 
one? As I can only have one Tokenizer with an empty Prefix I could also have 
only one "AppPlace" tied to that Tokenizer and so the getToken() / 
getPlace() methods of that Tokenizer would have to do all the magic to make 
thinks work. I think this would also mean that this one "AppPlace" needs to 
hold/know all other places so that they can store their state. Seems to me 
that this is not the nicest approach. Has someone already tried it? How does 
Google do that here in Google Groups?

What I currently try is to implement a custom PlaceHistoryMapper that allows 
me to support Places that extend from other places to reuse their state. 
Imagine you have a CustomerPlace that stores the currently selected customer 
id. That CustomerPlace would also have an activity because you can switch 
between customers and for each switch some stuff has to be done, e.g. load 
picture, check privileges of the user to present tasks that the user is 
allowed to do for that customer. Lets say once the task list is loaded you 
are able to edit the customer so there would be a EditCustomerPlace. Now the 
EditCustomerPlace also have to store that customer id because if you jump to 
that place directly via its history token you need that information. How do 
you handle these situations without code things twice?

So my Idea is to be able to do something like EditCustomerPlace extends 
CustomerPlace and to generate the EditCustomerPlace history token by reusing 
the one from CustomerPlace. 

Example:

CustomerPlace -> #/customer/1
EditCustomerPlace -> #/editcustomer/<CustomerPlace state>/<additional 
EditCustomerPlace state> -> #/editcustomer/customer/1/address

I couldn't do that without a custom PlaceHistoryMapper, right? Or are there 
other/easier ways to reuse place states? I somehow like the idea of having a 
more general place that stores the general state and multiple more specific 
places that only stores the specific state but also have access to the 
general state they need.

Thanks in advance for any helpful thoughts.

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