Package org.activiti.explorer.ui.custom

Examples of org.activiti.explorer.ui.custom.SelectUsersPopupWindow


    headerLayout.addComponent(addPeopleButton);
   
    addPeopleButton.addListener(new ClickListener() {
     
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow involvePeoplePopupWindow =
          new SelectUsersPopupWindow(i18nManager.getMessage(Messages.PEOPLE_INVOLVE_POPUP_CAPTION), true);
       
        involvePeoplePopupWindow.addListener(new SubmitEventListener() {
          protected void submitted(SubmitEvent event) {
            Collection<String> selectedUserIds = involvePeoplePopupWindow.getSelectedUserIds();
            for (String userId : selectedUserIds) {
              String role = involvePeoplePopupWindow.getSelectedUserRole(userId);
              taskService.addUserIdentityLink(task.getId(), userId, role);
            }
           
            taskDetailPanel.notifyPeopleInvolvedChanged();
          }
View Full Code Here


    addComponent(selectUserButton);
   
    selectUserButton.addListener(new ClickListener() {
      private static final long serialVersionUID = 1L;
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow window = new SelectUsersPopupWindow(
          i18nManager.getMessage(Messages.FORM_USER_SELECT), false);
        window.addListener(new SubmitEventListener() {
          private static final long serialVersionUID = 1L;

          @Override
          protected void submitted(SubmitEvent event) {
            String userId = window.getSelectedUserId();
            setValue(userId);
          }
         
          @Override
          protected void cancelled(SubmitEvent event) {
View Full Code Here

    membersHeader.addComponent(addButton);
    membersHeader.setComponentAlignment(addButton, Alignment.MIDDLE_RIGHT);
   
    addButton.addListener(new ClickListener() {
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow selectUsersPopup =  new SelectUsersPopupWindow(
                i18nManager.getMessage(Messages.GROUP_SELECT_MEMBERS, group.getId()),
                true, false, getCurrentMembers());
        ExplorerApp.get().getViewManager().showPopupWindow(selectUsersPopup);
       
        // Listen to submit events (that contain the selected users)
        selectUsersPopup.addListener(new SubmitEventListener() {
          protected void submitted(SubmitEvent event) {
            Collection<String> userIds = selectUsersPopup.getSelectedUserIds();
            if (!userIds.isEmpty()) {
              for (String userId : userIds) {
                identityService.createMembership(userId, group.getId());
              }
              notifyMembershipChanged();
View Full Code Here

    addComponent(selectUserButton);
   
    selectUserButton.addListener(new ClickListener() {
      private static final long serialVersionUID = 1L;
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow window = new SelectUsersPopupWindow(
          i18nManager.getMessage(Messages.FORM_USER_SELECT), false);
        window.addListener(new SubmitEventListener() {
          private static final long serialVersionUID = 1L;

          @Override
          protected void submitted(SubmitEvent event) {
            String userId = window.getSelectedUserId();
            setValue(userId);
          }
         
          @Override
          protected void cancelled(SubmitEvent event) {
View Full Code Here

    headerLayout.addComponent(addPeopleButton);
   
    addPeopleButton.addListener(new ClickListener() {
     
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow involvePeoplePopupWindow =
          new SelectUsersPopupWindow(i18nManager.getMessage(Messages.PEOPLE_INVOLVE_POPUP_CAPTION), true);
       
        involvePeoplePopupWindow.addListener(new SubmitEventListener() {
          protected void submitted(SubmitEvent event) {
            Collection<String> selectedUserIds = involvePeoplePopupWindow.getSelectedUserIds();
            for (String userId : selectedUserIds) {
              String role = involvePeoplePopupWindow.getSelectedUserRole(userId);
              taskService.addUserIdentityLink(task.getId(), userId, role);
            }
           
            taskDetailPanel.notifyPeopleInvolvedChanged();
          }
View Full Code Here

    List<String> ignoredIds = null;
    if (task.getAssignee() != null) {
      ignoredIds = Arrays.asList(task.getAssignee());
    }
   
    final SelectUsersPopupWindow involvePeoplePopupWindow =
        new SelectUsersPopupWindow(i18nManager.getMessage(Messages.TASK_ASSIGNEE_REASSIGN), false, ignoredIds);
   
    involvePeoplePopupWindow.addListener(new SubmitEventListener() {
      protected void submitted(SubmitEvent event) {
        // Update assignee
        String selectedUser = involvePeoplePopupWindow.getSelectedUserId();
        task.setAssignee(selectedUser);
        ProcessEngines.getDefaultProcessEngine().getTaskService().setAssignee(task.getId(), selectedUser);
       
        // Update UI
        taskDetailPanel.notifyAssigneeChanged();
View Full Code Here

    List<String> ignoredIds = null;
    if (task.getOwner() != null) {
      ignoredIds = Arrays.asList(task.getOwner());
    }
   
    final SelectUsersPopupWindow involvePeoplePopupWindow =
        new SelectUsersPopupWindow(i18nManager.getMessage(Messages.TASK_OWNER_TRANSFER), false, ignoredIds);
   
    involvePeoplePopupWindow.addListener(new SubmitEventListener() {
      private static final long serialVersionUID = 1L;

      protected void submitted(SubmitEvent event) {
        // Update owner
        String selectedUser = involvePeoplePopupWindow.getSelectedUserId();
        task.setOwner(selectedUser);
        ProcessEngines.getDefaultProcessEngine().getTaskService().setOwner(task.getId(), selectedUser);
       
        // Update UI
        taskDetailPanel.notifyOwnerChanged();
View Full Code Here

    membersHeader.addComponent(addButton);
    membersHeader.setComponentAlignment(addButton, Alignment.MIDDLE_RIGHT);
   
    addButton.addListener(new ClickListener() {
      public void buttonClick(ClickEvent event) {
        final SelectUsersPopupWindow selectUsersPopup =  new SelectUsersPopupWindow(
                i18nManager.getMessage(Messages.GROUP_SELECT_MEMBERS, group.getId()),
                true, false, getCurrentMembers());
        ExplorerApp.get().getViewManager().showPopupWindow(selectUsersPopup);
       
        // Listen to submit events (that contain the selected users)
        selectUsersPopup.addListener(new SubmitEventListener() {
          protected void submitted(SubmitEvent event) {
            Collection<String> userIds = selectUsersPopup.getSelectedUserIds();
            if (userIds.size() > 0) {
              for (String userId : userIds) {
                identityService.createMembership(userId, group.getId());
              }
              notifyMembershipChanged();
View Full Code Here

TOP

Related Classes of org.activiti.explorer.ui.custom.SelectUsersPopupWindow

Copyright © 2018 www.massapicom. 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.