Not exactly sure what you are looking for but I think you want to look at
the PlaceHistoryMapper:
public class AppPlaceHistoryMapper implements PlaceHistoryMapper{
public Place getPlace(String token) {
if(token.startsWith("something")){
//assume SomethingPlace has params
//so the token is actually "something?p1=2&p2=12"
//this would just route anything starting with "something"
//to the SomethingPlace
//the constructor should handle parsing the actual param values
return new SomethingPlace(token);
}else if(token.startsWith("something-else")){
return new SomethingElsePlace(token);
}
return null;
}
public String getToken(Place place) {
if(place instanceof AppPlace){
return ((AppPlace)place).getToken();
}
return null;
}
}
--
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/-/bU7NvTR9cqoJ.
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.