Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.Event


    try {
      float rating = Float.parseFloat(cmd);     
      // update GUI
      this.setCurrentRating(rating);
      // notify listeners
      Event event = new RatingEvent(rating);
      fireEvent(ureq, event);
    } catch (NumberFormatException e) {
      log.error("Error while parsing rating value::" + cmd);
    }   
  }
View Full Code Here


      if (event==Event.DONE_EVENT) {
        SortingCriteria newSortingCriteria = portletAutoSortingConfigurator.getSortingCriteria();       
        this.sortingCriteria = newSortingCriteria;       
        closeableModalController.deactivate();       
        closeableModalController.dispose();
        fireEvent(ureq, new Event(COMMAND_AUTO_SORTING));
      }
    } else if (source == portletManualSortingConfigurator) {
      if (event.getCommand().equals(Table.COMMAND_MULTISELECT)) {      
        this.sortedItems = portletManualSortingConfigurator.getSortedItems();
        closeableModalController.deactivate();
        closeableModalController.dispose();
        fireEvent(ureq, new Event(COMMAND_MANUAL_SORTING));
      }
    }
    if (event==Event.CANCELLED_EVENT) {
      closeableModalController.deactivate();
      closeableModalController.dispose();
View Full Code Here


      if (value1.equals(COMMAND_PAGEACTION_SHOWALL)) {
        //updatePageing(null);  (see OLAT-1340)     
        setShowAllSelected(true);
        fireEvent(ureq, new Event(COMMAND_PAGEACTION_SHOWALL));
        setDirty(true);
      } else if (value1.equals(COMMAND_PAGEACTION_FORWARD)) {
        if (currentPageId != null) {
          updatePageing(new Integer(currentPageId.intValue() + 1));
          setDirty(true);
        }
      } else if (value1.equals(COMMAND_PAGEACTION_BACKWARD)) {
        if (currentPageId != null) {
          updatePageing(new Integer(currentPageId.intValue() - 1));
          setDirty(true);
        }       
      } else if (value1.equals(COMMAND_SHOW_PAGES)) {
        setShowAllSelected(false);
        fireEvent(ureq, new Event(COMMAND_SHOW_PAGES));
        if (currentPageId != null) {
          updatePageing(new Integer(currentPageId.intValue()));         
        }else {
          updatePageing(new Integer(1));
        }
View Full Code Here

  /**
   * @see org.olat.core.gui.components.Component#dispatchRequest(org.olat.core.gui.UserRequest)
   */
  protected void doDispatchRequest(UserRequest ureq) {
    if (ureq.getParameter(ListRenderer.PARAM_EDTID) != null) {
      fireEvent(ureq, new Event(FolderCommandFactory.COMMAND_EDIT));
      return;
    } else if (ureq.getParameter(ListRenderer.PARAM_CONTENTEDITID) != null) {
      fireEvent(ureq, new Event(FolderCommandFactory.COMMAND_EDIT_CONTENT));
      return;
    } else if (ureq.getParameter(ListRenderer.PARAM_SERV) != null) {
      // this is a link on a file... deliver it
      fireEvent(ureq, new Event(FolderCommandFactory.COMMAND_SERV));
      // don't redraw the file listing when serving a resource -> timestamp not consumed
      setDirty(false);
      return;
      } else if (ureq.getParameter(ListRenderer.PARAM_SORTID) != null) {      // user clicked on table header for sorting column
        setSortAsc(ureq.getParameter(ListRenderer.PARAM_SORTID));
        sort(ureq.getParameter(ListRenderer.PARAM_SORTID));                    // just pass selected column
        return;
    } else if (ureq.getParameter("cid") != null) { // user clicked add layer...
      fireEvent(ureq, new Event(ureq.getParameter("cid")));
      return;
    } else if (ureq.getParameter(ListRenderer.PARAM_VERID) != null) {
      fireEvent(ureq, new Event(FolderCommandFactory.COMMAND_VIEW_VERSION));
      return;
    }

    // regular browsing, set current container
    setCurrentContainerPath(ureq.getModuleURI());
    fireEvent(ureq, new Event(FolderCommandFactory.COMMAND_BROWSE));
  }
View Full Code Here

      model.previous();
      createLinks();

    } else if (source == yearLink) {
      Year year = (Year) yearLink.getUserObject();
      Event navEvent = new NavigationEvent(year.getItems());
      fireEvent(ureq, navEvent);

    } else if (monthLinks.contains(source)) {
      Link monthLink = (Link) source;
      Month month = (Month) monthLink.getUserObject();
      Event navEvent = new NavigationEvent(month.getItems());
      fireEvent(ureq, navEvent);
    }
  }
View Full Code Here

  private void dispatch(UserRequest ureq, String cmd) {
    if(!command.equals(cmd)){
      throw new AssertException("hack attempt! command does not match the one from the UserRequest! Command recieved: " + cmd + " expected: " + command);
    }
    if (registerForMousePositionEvent) setXYOffest(ureq);
    fireEvent(ureq, new Event(cmd));
  }
View Full Code Here

      if (target != null) {
        // there was a component id given, and a matching target could be found
        componentListenerInfo = "<dispatchinfo>\n\t<componentinfo>\n\t\t<compname>" + target.getComponentName() + "</compname>\n\t\t<compclass>"
            + target.getClass().getName() + "</compclass>\n\t\t<extendedinfo>" + target.getExtendedDebugInfo()
            + "</extendedinfo>\n\t\t<event>";
        Event latestEv = target.getAndClearLatestFiredEvent();
        if (latestEv != null) {
          componentListenerInfo += "\n\t\t\t<class>"+latestEv.getClass().getName()+"</class>\n\t\t\t<command>"+latestEv.getCommand()+"</command>\n\t\t\t<tostring>"+latestEv+"</tostring>";
        }
        componentListenerInfo += "\n\t\t</event>\n\t</componentinfo>\n\t<controllerinfo>";
        Controller c = target.getLatestDispatchedController();
        if (c != null) {
          // can be null if the error occured in the component itself
View Full Code Here

    if (cancel != null) {
      setDirty(true);
      fireEvent(ureq, EVNT_FORM_CANCELLED);
    } else if (lookupCommand != null) {
      fireEvent(ureq, new Event(lookupCommand));
    } else { // assume form submit
      // cannot rely on this since a form can also be submitted by hitting
      // return, in which case
      // the submit button itself is not submitted
      // if (ureq.getParameter(Form.SUBMIT_IDENTIFICATION) != null) {
View Full Code Here

   
    // now: normal links are created using the Link component, which takes care of setting dirty itself (everytime it is dispatched)
    //setDirty(true);
   
    // notify listening controllers
    fireEvent(ureq, new Event(commandString));
 
View Full Code Here

    createOrUpdateSynonymLayout(this.flc, glossItemSynonyms);
   
    if (!checkForDuplicatesInGlossary()){
      showError("term.error.alreadyused", duplicateGlossItem.getGlossTerm());
      glossaryTermField.setErrorKey("term.error.alreadyused", new String[]{duplicateGlossItem.getGlossTerm()} );
    } else fireEvent(ureq, new Event("termOK"));
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.Event

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.