If you add "-gen <path/folder>" to your compiler args (or to dev mode args) 
you can see what GWT generates for you. That often helps to understand whats 
going on under the hood. If I remember correctly GWT generates a 
PlaceHistoryMapper for you that contains a long if - else if - else if .... 
- else block which checks all the prefixes you have defined in your 
tokenizers against the prefix in the url and then uses the corresponding 
tokenizer. If you have two tokenizer with the same prefix the code generator 
does not know which tokenizer to use for a given url.

In your case you would just have a single PhotoPlace (with its 
PhotoPlaceTokenizer) whose tokens would be AlbumList and Detail. In your 
ActivityMapper you could return different activities based on the token. 
Alternatively you can create an abstract PhotoPlace and let PhotoDetailPlace 
and PhotoAlbumListPlace extend from it. Then create a PhotoPlaceTokenizer 
that extends Tokenizer<PhotoPlace> and you are now in charge of both places 
in the same Tokenizer. That way you have moved some logic from 
ActivityMapper into the Tokenizer (basically the if that dispatches the 
token to return the correct activity will now return the correct place based 
on the token).

-- J.

-- 
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/-/WuYEZTvCahQJ.
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