I’am currently working on GWTs Activity-Place implementation. Now I have found problem with the PlaceHistoryGenerator.
I have a Tokenizer in my Place-Class. The Tokenizer is based on a Superclass. The Superclass implements the interface “PlaceTokenizer”.
So far, so good! But the PlaceHistoryGenerator in GWT ignores the declared interfaces in the Superclass.
The only solution, which i have found is, to declare the interface in both (Superclass and Subclass). This makes me not really happy.
public abstract class BasePlaceTokenizer<P extends Place> implements PlaceTokenizer<P> {
@Override
public P getPlace(final String token) {
...
return place;
}
@Override
public String getToken(final P place) {
...
return "anything...";
}
}
public class HelloPlace {
public static class Tokenizer extends BasePlaceTokenizer<HelloPlace> {
// implements PlaceTokenizer<HelloPlace> {
@Override
public HelloPlace getPlace(final String token) {
...
return place;
}
}
}
This is a known issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=5658
EDIT: fixed as of GWT 2.5.0