I want my little GWT application to have all of the following "bookmarkable" Place s:
http://www.mywebapp.com --> "home page" http://www.mywebapp.com/login --> login screen http://www.mywebapp.com/main --> main menu, after logged in http://www.mywebapp.com/start --> start of a transactional process http://www.mywebapp.com/complete --> end of transactional process (receipt)
So, I went ahead and created 5 Place subclasses, all of which are as follows:
public class LoginPlace extends Place {
And they have corresponding tokenizers:
public class LoginPlaceTokenizer extends PlaceTokenizer<LoginPlace> { @Override public LoginPlace getPlace(String token) {
I am trying to implement PlaceHistoryMapper for my application:
@WithTokenizers({ HomePlaceTokenizer.class, LoginPlaceTokenizer.class, MainMenuPlaceTokenizer.class // etc. }) public class MyWebAppPlaceHistoryMapper implements PlaceHistoryMapper { @Override public Place getPlace(String token) { // ??? } @Override public String getToken(Place place) { // ??? } }
The companion getPlace / getToken in subclasses of PlaceTokenizer<T> and in MyWebAppPlaceHistoryMapper seem to do the same. Are they? If so, am I just using the same code inside them? If they do not match, how do they differ from each other and how to implement them?
Keep in mind the URL markers that I want as bookmarks in the application - I do not want to use the default GWT markers someDisplay:SomePlace . Thanks in advance!
user1768830
source share