Java Code Examples for com.google.gwt.user.client.History#getToken()

The following examples show how to use com.google.gwt.user.client.History#getToken() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: gwt-ol   File: GwtOLPlayground.java    License: Apache License 2.0 6 votes vote down vote up
@Override
public void onModuleLoad() {

    Map<String, Integer> exampleIndexMap = new HashMap<>();

    // choose your example
    TabLayoutPanel tabs = new TabLayoutPanel(27, Style.Unit.PX);

    int index = 0;

    for (OLExampleType example : OLExampleType.values()) {
        tabs.add(new LazyExampleWidget(example), example.name().replace("Example", ""));
        exampleIndexMap.put(example.name(), index);
        index++;
    }
    RootLayoutPanel.get().add(tabs);

    String token = History.getToken();

    if (token != null && exampleIndexMap.containsKey(token)) {
        tabs.selectTab(exampleIndexMap.get(token));
    }
}
 
Example 2
@Override
public void execute() {
    String initialToken = History.getToken();
   /* if (!initialToken.isEmpty() && !isBlackListed(initialToken)) {
        List<PlaceRequest> hierarchy = formatter.toPlaceRequestHierarchy(initialToken);
        final PlaceRequest placeRequest = hierarchy.get(hierarchy.size() - 1);

        Scheduler.get().scheduleDeferred(() -> placeManager.revealPlace(placeRequest, true));
        bootstrapContext.setInitialPlace(placeRequest.getNameToken());
    } else {
        placeManager.revealDefaultPlace();
    }*/

    String title = productConfig.getProfile() == PRODUCT ? "JBoss EAP" : "WildFly";
    Browser.getDocument().setTitle(title + " Management");
    // TODO (hbraun): disabled until we now how this should work on a finder access (relative url's)
    placeManager.revealDefaultPlace();
}
 
Example 3
private void redraw(boolean autoScroll) {
	if (autoScroll) {
		String historyToken = History.getToken();
		if (!Strings.isNullOrEmpty(historyToken)) {
			int top = this.affixMenu.getPinnedOffset();
			Window.scrollTo(Window.getScrollLeft(), top);
		} else {
			Window.scrollTo(Window.getScrollLeft(), 0);
		}
	}
}
 
Example 4
Source Project: mvp4g   File: DefaultHistoryProxy.java    License: Apache License 2.0 4 votes vote down vote up
public String getToken() {
  return History.getToken();
}
 
Example 5
Source Project: swellrt   File: HistoryProviderDefault.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public String getToken() {
  return History.getToken();
}
 
Example 6
@Override
public String getToken() {
  return History.getToken();
}