Package org.olat.group.ui.context

Examples of org.olat.group.ui.context.BGContextEvent


        return;
      }else if(Event.CHANGED_EVENT == event){
        //a group was created in group chooser
        if(!hasGroups)
        //fires an Multiuser designed bgcontext event NOT on the systembus if business group were created
        fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
      }
    } else if (source == areaChooseC) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        String selection = "";
        selection = StringHelper.formatAsCSVString(areaChooseC.getSelectedEntries());
        // apply selection to textelement
        easyAreaTE.setValue(selection);
        validateGroupFields();
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
      }else if(Event.CHANGED_EVENT == event){
        if(!hasAreas){
          //an area was created in area chooser
          //fires an Multiuser designed bgcontext event NOT on the systembus if area were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
      }
    } else if (source == groupCreateCntrllr) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        // validate element -> e.g. remove error
        if (easyGroupTE.isEmpty()) {
          // was empty before -> set the created groups
          easyGroupTE.setValue(StringHelper.formatAsCSVString(groupCreateCntrllr.getCreatedGroupNames()));
        }
        validateGroupFields();
        // toggle prepared links (create -> choose)
        flc.remove(createGroupsLink);
        flc.add(chooseGroupsLink);

        groupCreateCntrllr.dispose();
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        if(!hasGroups){
          //fires an Multiuser designed bgcontext event NOT on the systembus if business group were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
        hasGroups = true;// at least one group created
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
      }
    } else if (source == areaCreateCntrllr) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        // validate element -> e.g. remove error
        if (easyAreaTE.isEmpty()) {
          // was empty before -> set the created groups
          easyAreaTE.setValue(StringHelper.formatAsCSVString(areaCreateCntrllr.getCreatedAreaNames()));
        }
        validateGroupFields();
        // toggle prepared links (create -> choose)
        flc.remove(createAreasLink);
        flc.add(chooseAreasLink);

        areaCreateCntrllr.dispose();
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        if (!hasAreas) {
          // fires an Multiuser designed bgcontext event NOT on the systembus if
          // area were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
        hasAreas = true;// at least one group created
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
View Full Code Here


  /**
   * @see org.olat.core.util.event.GenericEventListener#event(org.olat.core.gui.control.Event)
   */
  public void event(Event event) {
    if (event instanceof BGContextEvent) {
      BGContextEvent contextEvent = (BGContextEvent) event;
      if (contextEvent.getBgContextKey().equals(this.bgContext.getKey())) {
        if (contextEvent.getCommand().equals(BGContextEvent.CONTEXT_DELETED)
            || contextEvent.getCommand().equals(BGContextEvent.RESOURCE_REMOVED)) {
          //this results in a screen where the BGManagementController
          //is no longer functional -> hence only closeable
          dispose();//disposed message is defined in constructor!
        }
      }
View Full Code Here

        return;
      }else if(Event.CHANGED_EVENT == event){
        //a group was created in group chooser
        if(!hasGroups)
        //fires an Multiuser designed bgcontext event NOT on the systembus if business group were created
        fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
      }
    } else if (source == areaChooseC) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        String selection = "";
        selection = StringHelper.formatAsCSVString(areaChooseC.getSelectedEntries());
        // apply selection to textelement
        easyAreaTE.setValue(selection);
        validateFormLogic(ureq);
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
      }else if(Event.CHANGED_EVENT == event){
        if(!hasAreas){
          //an area was created in area chooser
          //fires an Multiuser designed bgcontext event NOT on the systembus if area were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
      }
    } else if (source == groupCreateCntrllr) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        // validate element -> e.g. remove error
        if (easyGroupTE.isEmpty()) {
          // was empty before -> set the created groups
          easyGroupTE.setValue(StringHelper.formatAsCSVString(groupCreateCntrllr.getCreatedGroupNames()));
        }
        validateFormLogic(ureq);
        // toggle prepared links (create -> choose)
        flc.remove(createGroupsLink);
        flc.add(chooseGroupsLink);

        groupCreateCntrllr.dispose();
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        if(!hasGroups){
          //fires an Multiuser designed bgcontext event NOT on the systembus if business group were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
        hasGroups = true;// at least one group created
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
      }
    } else if (source == areaCreateCntrllr) {
      if (org.olat.core.gui.control.Event.DONE_EVENT == event) {
        // validate element -> e.g. remove error
        if (easyAreaTE.isEmpty()) {
          // was empty before -> set the created groups
          easyAreaTE.setValue(StringHelper.formatAsCSVString(areaCreateCntrllr.getCreatedAreaNames()));
        }
        validateFormLogic(ureq);
        // toggle prepared links (create -> choose)
        flc.remove(createAreasLink);
        flc.add(chooseAreasLink);

        areaCreateCntrllr.dispose();
        //TODO:pb find better solution
        this.flc.getRootForm().setDirtyMarking(true);
        this.flc.setDirty(true);
        cmc.deactivate();
        if (!hasAreas) {
          // fires an Multiuser designed bgcontext event NOT on the systembus if
          // area were created
          fireEvent(ureq, new BGContextEvent(BGContextEvent.RESOURCE_ADDED,getDefaultBGContext()));
        }
        hasAreas = true;// at least one group created
      }else if (org.olat.core.gui.control.Event.CANCELLED_EVENT == event){
        closeCMCandSetWholeFormDirty(source);
        return;
View Full Code Here

TOP

Related Classes of org.olat.group.ui.context.BGContextEvent

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.