@PostConstruct
private void init() {
History.addValueChangeHandler(new ValueChangeHandler<String>() {
@Override
public void onValueChange(ValueChangeEvent<String> event) {
PageNode page = navGraph.getPage(event.getValue());
makePageVisible(page);
}
});
String initialToken = History.getToken();
PageNode initialPage = navGraph.getPage(initialToken);
if (initialPage == null) {
initialPage = navGraph.getPage(""); // Default page
}
goTo(initialPage);
}