Exemple #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();
    // }
  }
Exemple #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());
     }
   }
 }
Exemple #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());
     }
   }
 }
Exemple #4
0
 public void evalHistoryToken(String token) {
   historyToken.evalHistoryToken(token);
 }
Exemple #5
0
 public void gotoPageWithEntity(String page, AGwtEntity entity) {
   historyToken.updatePageAndEntity(page, entity, true);
 }
Exemple #6
0
 public void updateHistoryTokenWithoutChangingUi(String page, AGwtEntity entity) {
   historyToken.updatePageAndEntity(page, entity, false);
 }
Exemple #7
0
 public boolean isToggleMode() {
   return historyToken.isToggle();
 }
Exemple #8
0
 private void showPageAndEntity() {
   showPageAndEntity(historyToken.getPage(), historyToken.getEntityId());
 }