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