I wan't the plain vanilla activites, places and history handling just as explained on GWT site.
The place and activity seems to work, the placeChangeEvent is fired and all but the URL does not change. This is when I have a Anchor-widget with a clickhandler that uses the presenter.goTo
if I instead use a HyperLink the URL change but then the activity does not change and nothing happens...
I cannot see my error. The history handling is not set up somehow, if I manually enter the expected #place:token it does not work either.
Below is my "setup" in onModuleLoad
GWT 2.4 btw
============================================
Place defaultPlace = new TaskListListPlace();
SimplePanel appWidget = new SimplePanel();
ClientFactory factory = GWT.create(ClientFactory.class);
EventBus eventBus = factory.getEventBus();
PlaceController placeController = factory.getPlaceController();
ActivityMapper activityMapper = new AppActivityMapper(factory);
ActivityManager activityManager = new ActivityManager(activityMapper, eventBus);
activityManager.setDisplay(appWidget);
AppPlaceHistoryMapper historyMapper = GWT.create(AppPlaceHistoryMapper.class);
PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
historyHandler.register(placeController, eventBus, defaultPlace);
RootPanel.get("app").add(appWidget);
historyHandler.handleCurrentHistory();
eventBus.addHandler(PlaceChangeEvent.TYPE, new PlaceChangeEvent.Handler() {
@Override
public void onPlaceChange(PlaceChangeEvent event) {
Window.alert("Place change event!");
}
});