Package org.olat.core.gui.components.table

Examples of org.olat.core.gui.components.table.TableMultiSelectEvent


          foundIdentities.add(foundIdentity);
          // Tell parentController that a subject has been found
          fireEvent(ureq, new SingleIdentityChosenEvent(foundIdentity));
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          foundIdentities = tdm.getObjects(tmse.getSelection());
          fireEvent(ureq, new MultiIdentityChosenEvent(foundIdentities));
        }
      }
    } else if (source == autocompleterC) {
      EntriesChosenEvent ece = (EntriesChosenEvent)event;
View Full Code Here


          Identity foundIdentity = (Identity) tdm.getObject(rowid);
          UserDeletionManager.getInstance().setIdentityAsActiv(foundIdentity);
          updateUserList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          handleDeleteButtonEvent(ureq, tmse);
        }
      }
    } else if (source == deleteConfirmController) {
      if (DialogBoxUIFactory.isOkEvent(event)) {
View Full Code Here

   */
  public void event(UserRequest ureq, Controller sourceController, Event event) {
    if (sourceController == tableCtr) {
      if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        // Multiselect events
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(COMMAND_MOVE_USER_WAITINGLIST)) {
          if (tmse.getSelection().isEmpty()) {
            getWindowControl().setWarning(translate("msg.selectionempty"));
          else {       
            List<Identity> objects = identitiesTableModel.getIdentities(tmse.getSelection());
            toTransfer = objects;
            if (transferMailCtr != null) transferMailCtr.dispose();
            transferMailCtr = new MailNotificationEditController(getWindowControl(), ureq, transferUserMailTempl, true);
            transferMailCtr.addControllerListener(this);
            cmc = new CloseableModalController(getWindowControl(), translate("close"), transferMailCtr.getInitialComponent());
View Full Code Here

          .getLocation(), manageDatesForm.getDuration(), manageDatesForm.getPause(), manageDatesForm.getBeginDate(), manageDatesForm
          .getRetakes(), manageDatesForm.getNumParts(), editTableDataList, denCourseNode.getIdent());
      denManager.persistDENSettings(editTableDataList, course, denCourseNode);
      editDENTable.setTableDataModel(editTableData);
    } else if(source == editDENTable) {
      TableMultiSelectEvent tmse = (TableMultiSelectEvent)event;
      selectedDates = tmse.getSelection();
      //clicked button to edit one date or more dates
      if (tmse.getAction().equals(DENEditTableDataModel.CHANGE_ACTION) && selectedDates.cardinality() > 0) {
        if(selectedDates.cardinality() == 1) {
          //if only one date is choosen, we can prefill some entries
          editSingleDateForm = new DENDatesForm(ureq, getWindowControl(), getTranslator(), DENDatesForm.EDIT_SINGLE_DATE_LAYOUT);
          editSingleDateForm.addControllerListener(this);
          KalendarEvent calEvent = (KalendarEvent)editTableData.getObjects(selectedDates).get(0);//in this case only one date is possible
          editSingleDateForm.setSubject(calEvent.getSubject());
          editSingleDateForm.setComment(calEvent.getComment());
          editSingleDateForm.setLocation(calEvent.getLocation());
          editSingleDateForm.setNumParts(calEvent.getNumParticipants());
          editSingleDateForm.setFormDate(calEvent.getBegin());
          editSingleDateForm.setDuration(denManager.getDurationAsString(calEvent));
          editDateModalCntrll = new CloseableModalController(getWindowControl(), "close", editSingleDateForm.getInitialComponent(), true, translate("dates.edit"));
        } else if(selectedDates.cardinality() > 1) {
          editMultipleDatesForm = new DENDatesForm(ureq, getWindowControl(), getTranslator(), DENDatesForm.EDIT_MULTIPLE_DATES_LAYOUT);
          editMultipleDatesForm.addControllerListener(this);
          editDateModalCntrll = new CloseableModalController(getWindowControl(), "close", editMultipleDatesForm.getInitialComponent(), true, translate("dates.edit"));
        }
        //persist dates
        denManager.persistDENSettings(editTableData.getObjects(), course, denCourseNode);
        editDateModalCntrll.activate();
      } else if (tmse.getAction().equals(DENEditTableDataModel.DELETE_ACTION)) {
        //delete selected dates
        editTableData.removeEntries(tmse.getSelection());
        editDENTable.setTableDataModel(editTableData);
        //persist dates
        denManager.persistDENSettings(editTableData.getObjects(), course, denCourseNode);
      }
    } else if(source == editSingleDateForm) {
View Full Code Here

          int rowid = te.getRowId();
          RepositoryManager.setLastUsageNowFor( (RepositoryEntry) redtm.getObject(rowid) );
          updateRepositoryEntryList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          handleEmailButtonEvent(ureq, tmse);
        }
      }
      initializeContent();
    } else if (source == deleteRepositoryMailCtr) {
View Full Code Here

          int rowid = te.getRowId();
          RepositoryManager.setLastUsageNowFor( (RepositoryEntry) redtm.getObject(rowid) );
          updateRepositoryEntryList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          handleDeleteRepositoryEntriesEvent(ureq, tmse);
        }
      }
    } else if (source == deleteConfirmController) {
      if (DialogBoxUIFactory.isOkEvent(event)) {
View Full Code Here

          participantsVC.put("addParticipants", formManageParticipants.getInitialComponent());
          CloseableModalController manageParticipantsModalCntrl = new CloseableModalController(getWindowControl(), "close", participantsVC, true, translate("dates.table.participant.manage"));
          manageParticipantsModalCntrl.activate();
        }
      } else {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent)event;
        BitSet selection = tmse.getSelection();
        //delete all users from the selected dates
        if(tmse.getAction().equals(DENListTableDataModel.DELETE_ACTION) && selection.cardinality() > 0) {
          removed = denManager.getSelectedEventParticipants(dateList, selection);
          dateList = denManager.deleteParticipants(ores, courseNode, denManager.getSelectedEventIDs(dateList, selection));
          listTableData.setObjects(dateList);
          //send notification mail
          createRemovedNotificationMail(ureq, dateList.get(0).getSubject());
        } else if(tmse.getAction().equals(DENListTableDataModel.MAIL_ACTION) && selection.cardinality() > 0) {
          //send email to all users from the selected dates
          List<Identity> participants = denManager.getSelectedEventParticipants(dateList, selection);
          createParticipantsMail(ureq, participants);
        } else if(selection.cardinality() == 0) {
          getWindowControl().setWarning(translate("participants.message.empty"));
View Full Code Here

          int rowid = te.getRowId();
          GroupDeletionManager.getInstance().setLastUsageNowFor((BusinessGroup) redtm.getObject(rowid));
          updateGroupList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          handleEmailButtonEvent(ureq, tmse);
        }
      }
      initializeContent();
    } else if (source == deleteGroupMailCtr) {
View Full Code Here

          int rowid = te.getRowId();
          GroupDeletionManager.getInstance().setLastUsageNowFor( (BusinessGroup) redtm.getObject(rowid) );
          updateGroupList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
        if (tmse.getAction().equals(ACTION_MULTISELECT_CHOOSE)) {
          handleDeleteGroupButtonEvent(ureq, tmse);
        }
      }
    } else if (source == deleteConfirmController) {
      if (DialogBoxUIFactory.isOkEvent(event)) {
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.table.TableMultiSelectEvent

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.