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

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


        }
      }
      fireEvent(ureq, Event.CHANGED_EVENT);
    } else if (source == this.resourcesCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentRepoEntry = (RepositoryEntry)this.repoTableModel.getObject(rowid);
        if (actionid.equals(RepositoryTableModel.TABLE_ACTION_SELECT_LINK)) {
          if (this.groupContext.isDefaultContext()) {
            if (this.repoTableModelEntries.size() == 1) {
              // display error and exit - do not remove resource
View Full Code Here


        fireEvent(ureq, Event.DONE_EVENT);
      }
    }
    else if (source == groupListCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_CHOOSE_GROUP)) {
          int rowid = te.getRowId();
          GroupAndContextTableModel groupListModel = (GroupAndContextTableModel) groupListCtr.getTableDataModel();
          this.currentGroup = groupListModel.getBusinessGroupAt(rowid);
          this.identitiesList = getGroupIdentitiesFromGroupmanagement(this.currentGroup);
          // Init the user list with this identitites list
          doUserChooseWithData(ureq, this.identitiesList, this.currentGroup, this.currentCourseNode);
        }
      }
    }
    else if (source == userListCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_CHOOSE_USER)) {
          int rowid = te.getRowId();
          ICourse course = CourseFactory.loadCourse(ores);
          if (userListCtr.getTableDataModel() instanceof UserTableDataModel) {
            // in user MODE_USERFOCUS, a simple identity table is used, no wrapped identites
            UserTableDataModel userListModel = (UserTableDataModel) userListCtr.getTableDataModel();
            Identity assessedIdentity = userListModel.getIdentityAt(rowid);
            this.assessedIdentityWrapper = AssessmentHelper.wrapIdentity(assessedIdentity,
                this.localUserCourseEnvironmentCache, course, null);
          } else {
            // all other cases where user can be choosen the assessed identity wrapper is used
            AssessedIdentitiesTableDataModel userListModel = (AssessedIdentitiesTableDataModel) userListCtr.getTableDataModel();
            this.assessedIdentityWrapper = userListModel.getWrappedIdentity(rowid);
          }
          // init edit controller for this identity and this course node
          // or use identity assessment overview if no course node is defined
          if (this.currentCourseNode == null) {
            UserCourseEnvironment chooseUserCourseEnv = assessedIdentityWrapper.getUserCourseEnvironment();   
            removeAsListenerAndDispose(identityAssessmentController);
            identityAssessmentController = new IdentityAssessmentEditController(getWindowControl(),ureq, chooseUserCourseEnv, course, true);
            listenTo(identityAssessmentController);
            setContent(identityAssessmentController.getInitialComponent());
          } else {
            removeAsListenerAndDispose(assessmentEditController);
            assessmentEditController = new AssessmentEditController(ureq, getWindowControl(),course, currentCourseNode, assessedIdentityWrapper);
            listenTo(assessmentEditController);
            main.setContent(assessmentEditController.getInitialComponent());
          }
        }
      } else if (event.equals(TableController.EVENT_FILTER_SELECTED)) {
        this.currentCourseNode = (AssessableCourseNode) userListCtr.getActiveFilter();
        doUserChooseWithData(ureq, this.identitiesList, this.currentGroup, this.currentCourseNode);
      }
    }
    else if (source == nodeListCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_SELECT_NODE)) {
          ICourse course = CourseFactory.loadCourse(ores);
          int rowid = te.getRowId();
          Map<String,Object> nodeData = (Map<String,Object>) nodeTableModel.getObject(rowid);
          CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
          this.currentCourseNode = (AssessableCourseNode) node;
          // cast should be save, only assessable nodes are selectable
          doGroupChoose(ureq);
View Full Code Here

      // else cancel event. in any case set content to list
      main.setContent(myContent);
    }

    if (source == tableCtr && event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent)event;
        Quota q = quotaTableModel.getRowData(te.getRowId());
        if (te.getActionId().equals("qf.edit")) {
          // clean up old controller first
          if (quotaEditCtr != null) removeAsListenerAndDispose(quotaEditCtr);
          // start edit workflow in dedicated quota edit controller
          quotaEditCtr = new GenericQuotaEditController(ureq, getWindowControl(), q);
          listenTo(quotaEditCtr);
          main.setContent(quotaEditCtr.getInitialComponent());

        } else if (te.getActionId().equals("qf.del")) {
          // try to delete quota
          boolean deleted = QuotaManager.getInstance().deleteCustomQuota(q);
          if (deleted) {
            quotaTableModel.refresh();
            tableCtr.setTableDataModel(quotaTableModel);
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        if (te.getActionId().equals(ACTION_SINGLESELECT_CHOOSE)) {
          int rowid = te.getRowId();
          Identity foundIdentity = (Identity)tdm.getObject(rowid);
          foundIdentities.add(foundIdentity);
          // Tell parentController that a subject has been found
          fireEvent(ureq, new SingleIdentityChosenEvent(foundIdentity));
        }
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        if (te.getActionId().equals(ACTION_SINGLESELECT_CHOOSE)) {
          int rowid = te.getRowId();
          Identity foundIdentity = (Identity) tdm.getObject(rowid);
          UserDeletionManager.getInstance().setIdentityAsActiv(foundIdentity);
          updateUserList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
View Full Code Here

        wc.setWizardTitle(translate("wizard.step2.title"));
        wc.setNextWizardStep(translate("wizard.step2.howto"), step2VC);
    }
    // event from step 2, preparing step 3
    if (source == nodeListCtr && event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals(CMD_SELECT_NODE)) {
          int rowid = te.getRowId();
          Map nodeData = (Map) nodeTableModel.getObject(rowid);
          ICourse course = CourseFactory.loadCourse(ores);
          this.currentCourseNode = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
          currentNodeShortTitle = currentCourseNode.getShortTitle();
         
View Full Code Here

        doGroupList(ureq, true);
      } else if (event.equals(TableController.EVENT_FILTER_SELECTED)) {
        this.currentAreaFilter = (BGArea) groupListCtr.getActiveFilter();
        doGroupList(ureq, true);
      } else if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentGroup = groupListModel.getBusinessGroupAt(rowid);
        if (actionid.equals(CMD_GROUP_EDIT)) {
          doGroupEdit(ureq);
        } else if (actionid.equals(CMD_GROUP_RUN)) {
          doGroupRun(ureq);
        } else if (actionid.equals(CMD_GROUP_DELETE)) {
          doGroupDeleteConfirm(ureq);
        }
      }
    } else if (source == areaListCtr) {
      if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentArea = areaListModel.getBGAreaAt(rowid);
        if (actionid.equals(CMD_AREA_EDIT)) {
          doAreaEdit(ureq);
        } else if (actionid.equals(CMD_AREA_DELETE)) {
          doAreaDeleteConfirm(ureq);
        }
      }
    } else if (source == ownerListCtr) {
      if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentIdentity = ownerListModel.getIdentityAt(rowid);
        if (actionid.equals(CMD_USER_DETAILS)) {
          doUserDetails(ureq);
        }
      }
    } else if (source == participantListCtr) {
      if (cmd.equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        this.currentIdentity = participantListModel.getIdentityAt(rowid);
        if (actionid.equals(CMD_USER_DETAILS)) {
          doUserDetails(ureq);
        }
      }
View Full Code Here

        tableCtr.modelChanged();
      }
    }
     else if (source ==  tableCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        if (actionid.equals("delete")) {
          int rowid = te.getRowId();
          Authentication auth = (Authentication) authTableModel.getObject(rowid);
          confirmationDialog = activateYesNoDialog(ureq, null, getTranslator().translate("authedit.delete.confirm", new String[] { auth.getProvider(), changeableIdentity.getName() }), confirmationDialog);
          confirmationDialog.setUserObject(auth);
          return;
        }
View Full Code Here

   *      org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Controller source, Event event) {
      if (source == nodeListCtr) {
        if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
          TableEvent te = (TableEvent) event;
          String actionid = te.getActionId();
          if (actionid.equals(CMD_SELECT_NODE)) {

            ICourse course = CourseFactory.loadCourse(ores);
            int rowid = te.getRowId();
            Map nodeData = (Map) nodeTableModel.getObject(rowid);
            this.currentCourseNode = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
           
            List bulkActions = new ArrayList();
            BulkActionGetNodeScore baGetNodeScore = new BulkActionGetNodeScore(course, currentCourseNode, getTranslator());
View Full Code Here

 
  @Override
  public void event(UserRequest ureq, Controller source, Event event) {
    if(source == nodeListCtr) {
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent tae = (TableEvent)event;
       
        Map<String,Object> nodeData = (Map<String,Object>) nodeTableModel.getObject(tae.getRowId());
        ICourse course = CourseFactory.loadCourse(courseId);
        CourseNode node = course.getRunStructure().getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
        if(node instanceof ScormCourseNode) {
          finishedVC = createVelocityContainer("finished");
          showFileButton = LinkFactory.createButton("showfile", finishedVC, this);
View Full Code Here

TOP

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

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.