예제 #1
0
  private void showPageAndEntity(String page, String entityId) {
    new TouchLastActivityServiceCall().execute();
    ProjectWorkspaceWidgets workspace = Scope.get().getComponent(ProjectWorkspaceWidgets.class);

    if (historyToken.getPage() == null && page == null) page = HistoryToken.START_PAGE;

    if (page != null) workspace.showPage(page);

    if (entityId != null) {
      if (ScrumGwt.isEntityReferenceOrWikiPage(entityId)) {
        workspace.showEntityByReference(entityId);
      } else {
        if ("Forum".equals(historyToken.getPage())) {
          ForumSupport entity = (ForumSupport) AEntity.getById(entityId);
          workspace.showForum(entity);
        } else {
          workspace.showEntityById(entityId);
        }
      }
    }

    // if (search != null &&
    // !Page.getPageName(SearchResultsWidget.class).equals(historyToken.getPage()))
    // {
    // search.clear();
    // }
  }
예제 #2
0
 public void onProjectChanged(String projectId) {
   if (projectId == null) {
     showUserMode(historyToken.getPage());
   } else {
     try {
       showProject(projectId, historyToken.getPage(), historyToken.getEntityId());
     } catch (Exception ex) {
       log.error("Opening project failed:", projectId, ex);
       showUserMode(historyToken.getPage());
     }
   }
 }
예제 #3
0
 public void start() {
   evalHistoryToken(History.getToken());
   if (!historyToken.isProjectIdSet()) {
     User user = auth.getUser();
     Project project = user.getCurrentProject();
     if (project == null || user.isAdmin()) {
       gotoProjectSelector();
     } else {
       gotoProject(project.getId());
     }
   }
 }
예제 #4
0
 public void evalHistoryToken(String token) {
   historyToken.evalHistoryToken(token);
 }
예제 #5
0
 public void gotoPageWithEntity(String page, AGwtEntity entity) {
   historyToken.updatePageAndEntity(page, entity, true);
 }
예제 #6
0
 public void updateHistoryTokenWithoutChangingUi(String page, AGwtEntity entity) {
   historyToken.updatePageAndEntity(page, entity, false);
 }
예제 #7
0
 public boolean isToggleMode() {
   return historyToken.isToggle();
 }
예제 #8
0
 private void showPageAndEntity() {
   showPageAndEntity(historyToken.getPage(), historyToken.getEntityId());
 }