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

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


  @Override
  protected void event(UserRequest ureq, Controller source, Event event) {
    if(runDENTable == source) {
      //the link to enroll or cancel enrollment is clicked
      if(event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent tableEvent = (TableEvent)event;
        if(tableEvent.getActionId().equals(DENRunTableDataModel.CMD_ENROLL_IN_DATE)) {
          //do enroll
          KalendarEvent calEvent = (KalendarEvent)runTableData.getObject(tableEvent.getRowId());
          status = denManager.doEnroll(ureq.getIdentity(), calEvent, ores, courseNode);
          if(!status.isEnrolled()) showError();
          runDENTable.setTableDataModel(runTableData);
          fireEvent(ureq, Event.DONE_EVENT);
          // inform subscription context about changes
          NotificationsManager.getInstance().markPublisherNews(subsContext, ureq.getIdentity());
        } else if(tableEvent.getActionId().equals(DENRunTableDataModel.CMD_ENROLLED_CANCEL)) {
          //cancel enrollment
          KalendarEvent calEvent = (KalendarEvent)runTableData.getObject(tableEvent.getRowId());
          DENStatus status = denManager.cancelEnroll(ureq.getIdentity(), calEvent, ores, courseNode);
          if(!status.isCancelled()) showError();
          runDENTable.setTableDataModel(runTableData);
          fireEvent(ureq, Event.DONE_EVENT);
          // inform subscription context about changes
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 == tableFilterCtr) {
      if (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<String,Object> nodeData = (Map<String,Object>)nodesTableModel.getObject(rowid);
          CourseNode node = runStructure.getNode((String) nodeData.get(AssessmentHelper.KEY_IDENTIFYER));
          this.selectedCourseNode = (AssessableCourseNode) node;
          // cast should be save, only assessable nodes are selectable
          fireEvent(ureq, EVENT_NODE_SELECTED);
View Full Code Here

   * @see org.olat.core.gui.control.ControllerEventListener#dispatchEvent(org.olat.core.gui.UserRequest, 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;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        efficiencyStatement = efficiencyStatementsListModel.getEfficiencyStatementAt(rowid);
        if (actionid.equals(CMD_SHOW)) {         
          // will not be disposed on course run dispose, popus up as new browserwindow
          ControllerCreator ctrlCreator = new ControllerCreator() {
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
View Full Code Here

   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, 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;
        String actionid = te.getActionId();
        if (actionid.equals("choose")) {
          int rowid = te.getRowId();
          foundProp = (Property) tdm.getObject(rowid);
          // Tell parentController that a subject has been found
          fireEvent(ureq, new PropFoundEvent(foundProp));
        }
      }
View Full Code Here

  }
 
  @Override
  public void event(UserRequest ureq, Controller source, Event event) {
    if (source == summaryTableCtr) {
      TableEvent tEvent = (TableEvent)event;
      if (tEvent.getActionId().equals("sel")) {
        if(cmiTableCtr != null) {
          removeAsListenerAndDispose(cmiTableCtr);
        }
        if(cmc != null) {
          removeAsListenerAndDispose(cmc);
View Full Code Here

   */
  @SuppressWarnings("unused")
  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();
          GroupDeletionManager.getInstance().setLastUsageNowFor( (BusinessGroup) redtm.getObject(rowid) );
          updateGroupList();       
        }
      }
    }
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();
          RepositoryManager.setLastUsageNowFor( (RepositoryEntry) redtm.getObject(rowid) );
          updateRepositoryEntryList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
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();
          RepositoryManager.setLastUsageNowFor( (RepositoryEntry) redtm.getObject(rowid) );
          updateRepositoryEntryList();
        }
      } else if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {
        TableMultiSelectEvent tmse = (TableMultiSelectEvent) event;
View Full Code Here

  @Override
  protected void event(UserRequest ureq, Controller source, Event event) {
    super.event(ureq, source, event);
    if (source == tblCtr){
      if (event.getCommand().equals(Table.COMMANDLINK_ROWACTION_CLICKED)) {
        TableEvent te = (TableEvent) event;
        String actionid = te.getActionId();
        int rowid = te.getRowId();
        BusinessGroup currBusinessGroup = tableDataModel.getBusinessGroupAtRow(rowid);
        if (actionid.equals(TABLE_ACTION_LAUNCH)) {
          BusinessGroupManager bgm = BusinessGroupManagerImpl.getInstance();
          currBusinessGroup = bgm.loadBusinessGroup(currBusinessGroup.getKey(), false);
          if (currBusinessGroup==null) {
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();
          RepositoryManager.setLastUsageNowFor( (RepositoryEntry) redtm.getObject(rowid) );
          updateRepositoryEntryList();       
        }
      }
    }
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.