コード例 #1
0
  private void setInitialSelection() {
    final String ontologyName = com.google.gwt.user.client.Window.Location.getParameter("ontology");
    if (ontologyName == null || !projectId.getId().equals(ontologyName)) {
      return;
    }

    final String tabNameToSelect = com.google.gwt.user.client.Window.Location.getParameter("tab");
    if (tabNameToSelect == null) {
      return;
    }

    selectTabWithName(tabNameToSelect);
  }
コード例 #2
0
  private void selectTabWithName(String tabNameToSelect) {
    for (AbstractTab tab : tabs) {
      String tabName = tab.getClass().getName();
      tabName = tabName.substring(tabName.lastIndexOf(".") + 1);
      if (tabName.equals(tabNameToSelect)) {
        activate(tab.getId());
        doLayout();

        String selection = com.google.gwt.user.client.Window.Location.getParameter("id");
        if (selection != null) {
          selection = URL.decodeQueryString(selection);
          tab.setSelection(UIUtil.createCollection(new EntityData(selection)));
          break;
        }
      }
    }
  }