Examples of ViewManager


Examples of douyu.mvc.ViewManager

    throw new ViewException("No ViewManager for 'ViewManager.out()', controller='" + controllerClassName + "', attion='"
        + actionName + "'.");
  }

  private void outView(ViewManagerProvider vmp, String viewFileName) {
    ViewManager vm = vmp.getViewManager(this);
    if (vm == null)
      throw new ViewException("No ViewManager for view file: " + viewFileName);

    for (Map.Entry<String, Object> e : viewArgs.entrySet()) {
      vm.put(e.getKey(), e.getValue());
    }

    if (viewFileName == null)
      vm.out();
    else
      vm.out(viewFileName);
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

      directToSpecificTaskPage(category, taskId, uriFragment);
    }
  }
 
  protected void directToCategoryPage(String category, UriFragment uriFragment) {
    ViewManager viewManager = ExplorerApp.get().getViewManager();
    if (CATEGORY_TASKS.equals(category)) {
      viewManager.showTasksPage();
    } else if (CATEGORY_INBOX.equals(category)) {
      viewManager.showInboxPage();
    } else if(CATEGORY_QUEUED.equals(category)) {
      viewManager.showQueuedPage(uriFragment.getParameter(PARAMETER_GROUP));
    } else if (CATEGORY_INVOLVED.equals(category)){
      viewManager.showInvolvedPage();
    } else if (CATEGORY_ARCHIVED.equals(category)) {
      viewManager.showArchivedPage();
    } else {
      throw new ActivitiException("Couldn't find a matching category");
    }
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    }
  }
 
  protected void directToSpecificTaskPage(String category, String taskId, UriFragment uriFragment) {
    Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
    String loggedInUserId = ExplorerApp.get().getLoggedInUser().getId();
   
    boolean pageFound = false;
    if (CATEGORY_TASKS.equals(category)) {
      if (loggedInUserId.equals(task.getOwner())) {
        viewManager.showTasksPage(task.getId());
        pageFound = true;
      }
    } else if (CATEGORY_INBOX.equals(category)) {
      if (loggedInUserId.equals(task.getAssignee())) {
        viewManager.showInboxPage(task.getId());
        pageFound = true;
      }
    } else if(CATEGORY_QUEUED.equals(category)) {
      String groupId = uriFragment.getParameter(PARAMETER_GROUP);
     
      boolean isTaskAssignedToGroup = taskService.createTaskQuery()
        .taskId(task.getId())
        .taskCandidateGroup(groupId)
        .count() == 1;
     
      boolean isUserMemberOfGroup = identityService.createGroupQuery()
        .groupMember(loggedInUserId)
        .groupId(groupId)
        .count() == 1;
     
      if (isTaskAssignedToGroup && isUserMemberOfGroup) {
        viewManager.showQueuedPage(groupId, task.getId());
        pageFound = true;
      }
       
    } else if (CATEGORY_INVOLVED.equals(category)){
      boolean isUserInvolved = taskService.createTaskQuery()
        .taskInvolvedUser(loggedInUserId)
        .count() == 1;
     
      if (isUserInvolved) {
        viewManager.showInvolvedPage(task.getId());
        pageFound = true;
      }
    } else if (CATEGORY_ARCHIVED.equals(category)) {
      if (task == null) {
        boolean isOwner = historyService.createHistoricTaskInstanceQuery()
          .taskId(taskId)
          .taskOwner(loggedInUserId)
          .finished()
          .count() == 1;
       
        if (isOwner) {
          viewManager.showArchivedPage(taskId);
          pageFound = true;
        }
      }
    } else {
      throw new ActivitiException("Couldn't find a matching category");
    }
   
    if (!pageFound) {
      // If URL doesnt match anymore, we must use the task data to redirect to the right page
      viewManager.showTaskPage(taskId);
    }
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

      directToSpecificTaskPage(category, taskId, uriFragment);
    }
  }
 
  protected void directToCategoryPage(String category, UriFragment uriFragment) {
    ViewManager viewManager = ExplorerApp.get().getViewManager();
    if (CATEGORY_TASKS.equals(category)) {
      viewManager.showTasksPage();
    } else if (CATEGORY_INBOX.equals(category)) {
      viewManager.showInboxPage();
    } else if(CATEGORY_QUEUED.equals(category)) {
      viewManager.showQueuedPage(uriFragment.getParameter(PARAMETER_GROUP));
    } else if (CATEGORY_INVOLVED.equals(category)){
      viewManager.showInvolvedPage();
    } else if (CATEGORY_ARCHIVED.equals(category)) {
      viewManager.showArchivedPage();
    } else {
      throw new ActivitiException("Couldn't find a matching category");
    }
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    }
  }
 
  protected void directToSpecificTaskPage(String category, String taskId, UriFragment uriFragment) {
    Task task = taskService.createTaskQuery().taskId(taskId).singleResult();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
    String loggedInUserId = ExplorerApp.get().getLoggedInUser().getId();
   
    boolean pageFound = false;
    if (CATEGORY_TASKS.equals(category)) {
      if (loggedInUserId.equals(task.getOwner())) {
        viewManager.showTasksPage(task.getId());
        pageFound = true;
      }
    } else if (CATEGORY_INBOX.equals(category)) {
      if (loggedInUserId.equals(task.getAssignee())) {
        viewManager.showInboxPage(task.getId());
        pageFound = true;
      }
    } else if(CATEGORY_QUEUED.equals(category)) {
      String groupId = uriFragment.getParameter(PARAMETER_GROUP);
     
      boolean isTaskAssignedToGroup = taskService.createTaskQuery()
        .taskId(task.getId())
        .taskCandidateGroup(groupId)
        .count() == 1;
     
      boolean isUserMemberOfGroup = identityService.createGroupQuery()
        .groupMember(loggedInUserId)
        .groupId(groupId)
        .count() == 1;
     
      if (isTaskAssignedToGroup && isUserMemberOfGroup) {
        viewManager.showQueuedPage(groupId, task.getId());
        pageFound = true;
      }
       
    } else if (CATEGORY_INVOLVED.equals(category)){
      boolean isUserInvolved = taskService.createTaskQuery()
        .taskInvolvedUser(loggedInUserId)
        .count() == 1;
     
      if (isUserInvolved) {
        viewManager.showInvolvedPage(task.getId());
        pageFound = true;
      }
    } else if (CATEGORY_ARCHIVED.equals(category)) {
      if (task == null) {
        boolean isOwner = historyService.createHistoricTaskInstanceQuery()
          .taskId(taskId)
          .taskOwner(loggedInUserId)
          .finished()
          .count() == 1;
       
        if (isOwner) {
          viewManager.showArchivedPage(taskId);
          pageFound = true;
        }
      }
    } else {
      throw new ActivitiException("Couldn't find a matching category");
    }
   
    if (!pageFound) {
      // If URL doesnt match anymore, we must use the task data to redirect to the right page
      viewManager.showTaskPage(taskId);
    }
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    this.membershipChangeListener = memberShipChangeListener;
  }
 
  public void click(ClickEvent event) {
    I18nManager i18nManager = ExplorerApp.get().getI18nManager();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
   
    // Add listener to confirmation window. If confirmed, membership is deleted
    ConfirmationDialogPopupWindow confirmationPopup =
      new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.USER_CONFIRM_DELETE_GROUP, userId, groupId));
    confirmationPopup.addListener(new ConfirmationEventListener() {
      protected void rejected(ConfirmationEvent event) {
      }
      protected void confirmed(ConfirmationEvent event) {
        identityService.deleteMembership(userId, groupId);
        membershipChangeListener.notifyMembershipChanged();
      }
    });
   
    // Show popup
    viewManager.showPopupWindow(confirmationPopup);
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    this.subTaskComponent = subTaskComponent;
  }

  public void click(ClickEvent event) {
    I18nManager i18nManager = ExplorerApp.get().getI18nManager();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
    final TaskService taskService = ProcessEngines.getDefaultProcessEngine().getTaskService();
   
    ConfirmationDialogPopupWindow popup = new ConfirmationDialogPopupWindow(
            i18nManager.getMessage(Messages.TASK_CONFIRM_DELETE_SUBTASK, subTask.getName()));
    popup.addListener(new ConfirmationEventListener() {
      private static final long serialVersionUID = 1L;
      protected void rejected(ConfirmationEvent event) {
      }
      protected void confirmed(ConfirmationEvent event) {
        // delete subtask
        taskService.deleteTask(subTask.getId());
       
        // Refresh UI
        subTaskComponent.refreshSubTasks();
      }
    });
   
    viewManager.showPopupWindow(popup);
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    this.membershipChangeListener = memberShipChangeListener;
  }
 
  public void click(ClickEvent event) {
    I18nManager i18nManager = ExplorerApp.get().getI18nManager();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
   
    // Add listener to confirmation window. If confirmed, membership is deleted
    ConfirmationDialogPopupWindow confirmationPopup =
      new ConfirmationDialogPopupWindow(i18nManager.getMessage(Messages.USER_CONFIRM_DELETE_GROUP, userId, groupId));
    confirmationPopup.addListener(new ConfirmationEventListener() {
      protected void rejected(ConfirmationEvent event) {
      }
      protected void confirmed(ConfirmationEvent event) {
        identityService.deleteMembership(userId, groupId);
        membershipChangeListener.notifyMembershipChanged();
      }
    });
   
    // Show popup
    viewManager.showPopupWindow(confirmationPopup);
  }
View Full Code Here

Examples of org.activiti.explorer.ViewManager

    this.processInstancePage = processInstancePage;
  }

  public void buttonClick(ClickEvent event) {
    I18nManager i18nManager = ExplorerApp.get().getI18nManager();
    ViewManager viewManager = ExplorerApp.get().getViewManager();
   
    final ConfirmationDialogPopupWindow confirmPopup = new ConfirmationDialogPopupWindow(
            i18nManager.getMessage(Messages.PROCESS_INSTANCE_DELETE_POPUP_TITLE, processInstanceId),
            i18nManager.getMessage(Messages.PROCESS_INSTANCE_DELETE_POPUP_DESCRIPTION, processInstanceId));

    confirmPopup.addListener(new ConfirmationEventListener() {
      private static final long serialVersionUID = 1L;
      protected void confirmed(ConfirmationEvent event) {
        RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
        runtimeService.deleteProcessInstance(processInstanceId, null);
        processInstancePage.refreshSelectNext();
      }
    });
   
    viewManager.showPopupWindow(confirmPopup);
  }
View Full Code Here

Examples of org.jdesktop.wonderland.client.jme.ViewManager

                        filename.lastIndexOf(File.separatorChar) + 1);
                filename = filename.substring(0, filename.lastIndexOf('.'));
                modelNameTF.setText(filename);

                if (avatarMoveCB.isSelected()) {
                    ViewManager viewManager = ViewManager.getViewManager();
                    ViewCell viewCell = viewManager.getPrimaryViewCell();
                    viewCell.addTransformChangeListener(userMotionListener);
                }
            }
        });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.