protected void setup() { RootPanel.get().add(mainPresenter.getDisplay().asWidget()); mainPresenter.bind(); History.addValueChangeHandler(this); eventBus.addHandler( LoginSuccessfulEvent.TYPE, new LoginSuccessfulEventHandler() { @Override public void loginSuccessful(LoginSuccessfulEvent event) { History.newItem(getPreviousHistoryToken()); } }); eventBus.addHandler( LoginRequiredEvent.TYPE, new LoginRequiredEventHandler() { @Override public void loginRequired(LoginRequiredEvent event) { if (!AppPlace.HOME.equals(getPlace(History.getToken()))) { History.newItem(AppPlace.HOME.getToken()); } } }); switchSection(History.getToken()); }
public FlowPanel getLayout() { return mainPresenter.getDisplay().getLayout(); }