In the "How to Navigate" section of the the standard MVP example:
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html#How_to_navigateAn alternative to using the PlaceController.goTo() method to navigate, it is suggested to use a Hyperlink and settings its HistoryToken by calling the PlaceHistoryMapper's getToken() method. Now, in the example the PlaceHistoryMapper is not available to each "Activity" class since its not registered in the clientFactory class and is in no way accessible outside EntryPoint's onModuleLoad method.
So, whats the best way to proceed?
1. register the AppPlaceHistoryMapper in the clientFactory and then add a getPlaceHistoryMapper method to the clientFactory?
2. do AppPlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class); in any activity i want to call the PlaceHistoryMapper's getToken method?
3. make the PlaceHistoryMapper some kinda globally accessible static object?
Am I missing an obvious solution here???
Thanks in advance,
Lars