org.overlord.sramp.ui.client
Class PlaceHistoryMapperImpl
java.lang.Object
org.overlord.sramp.ui.client.PlaceHistoryMapperImpl
- All Implemented Interfaces:
- com.google.gwt.place.shared.PlaceHistoryMapper
public class PlaceHistoryMapperImpl
- extends Object
- implements com.google.gwt.place.shared.PlaceHistoryMapper
A custom place history mapper. This is necessary because I want the format of the place token to be:
http://host:port/srampui/u#/dashboard/browse?filter=xsd&order=name:d
The token in the above example is: /dashboard/browse?filter=xsd&order=name:d
The first part of the token is "/dashboard/browse" and the second part is "filter=xsd&order=name:d". This
cannot be accomplished using the standard GWT place history mapper tokenizer support because the
AbstractPlaceHistoryMapper does not have a way to customize the character separator between the two
parts. It is hard-coded to be a colon. Very sad for me.
This implementation uses the full listing of valid Places from the PlaceList class. This
could be improved by hooking into the rebind phase of the GWT compilation.
- Author:
- eric.wittmann@redhat.com
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PlaceHistoryMapperImpl
public PlaceHistoryMapperImpl()
- C'tor.
getPlace
public com.google.gwt.place.shared.Place getPlace(String token)
- Specified by:
getPlace in interface com.google.gwt.place.shared.PlaceHistoryMapper
- See Also:
PlaceHistoryMapper.getPlace(java.lang.String)
getToken
public String getToken(com.google.gwt.place.shared.Place place)
- Specified by:
getToken in interface com.google.gwt.place.shared.PlaceHistoryMapper
- See Also:
PlaceHistoryMapper.getToken(com.google.gwt.place.shared.Place)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.