historyHandler.handleCurrentHistory();
public void handleCurrentHistory() { this.historyHandler.handleCurrentHistory(); }
public void handleCurrentHistory() { this.historyHandler.handleCurrentHistory(); }
historyHandler.handleCurrentHistory();
private void init(ApplicationContext applicationContext) { // Start ActivityManager for the main widget with our ActivityMapper ActivityMapper activityMapper = applicationContext.activityMapper(this); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(appWidget); // Start PlaceHistoryHandler with our PlaceHistoryMapper final PlaceHistoryMapper historyMapper = applicationContext.placeHistoryMapper(); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper); historyHandler.register(placeController, eventBus, applicationContext.defaultPlace()); RootPanel.get("pageContent").add(appWidget); applicationContext.initialise(this); // Goes to the place represented on URL else default place historyHandler.handleCurrentHistory(); History.addValueChangeHandler(new ValueChangeHandler<String>() { @Override public void onValueChange(ValueChangeEvent<String> event) { Place place = historyMapper.getPlace(event.getValue()); if (place != null) { placeController.goTo(place); } } }); }
@Override public void onModuleLoad() { populateMenu(); // Create view container final SimplePanel container = new SimplePanel(); container.setStyleName("container requestor-showcase-container"); RootPanel.get().add(container); // Main Factory (Dependency Injector) ShowcaseClientFactory clientFactory = CLIENT_FACTORY; EventBus eventBus = clientFactory.getEventBus(); PlaceController placeController = clientFactory.getPlaceController(); // Activity-Place binding ActivityMapper activityMapper = new ShowcaseActivityMapper(); ActivityManager activityManager = new ActivityManager(activityMapper, eventBus); activityManager.setDisplay(container); // Place-History binding PlaceHistoryMapper historyMapper = new ShowcasePlaceHistoryMapper(); PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper); historyHandler.register(placeController, eventBus, defaultPlace); // Add Loading widget RootPanel.get().add(new Loading(eventBus)); // Goes to place represented on URL or default place historyHandler.handleCurrentHistory(); }