Package org.olat.core.gui.formelements

Examples of org.olat.core.gui.formelements.StaticSingleSelectionElement


  }

  private StaticSingleSelectionElement createStatusSelectionElement() {
    String[] statusKeys = { Integer.toString(Identity.STATUS_ACTIV), Integer.toString(Identity.STATUS_PERMANENT), Integer.toString(Identity.STATUS_LOGIN_DENIED) };
    String[] statusValues = {translate("rightsForm.status.activ"), translate("rightsForm.status.permanent"), translate("rightsForm.status.login_denied")};
    return new StaticSingleSelectionElement("rightsForm.status", statusKeys, statusValues);
  }
View Full Code Here


    this.assessableNodesList = nodeIdentList;

    String[] hasScoreKeys = new String[] { Boolean.TRUE.toString(), Boolean.FALSE.toString() };
    String[] hasScoreValues = new String[] { translate("scform.hasScore.yes"), translate("no") };

    hasScore = new StaticSingleSelectionElement("scform.hasScore", hasScoreKeys, hasScoreValues);
    addFormElement("hasScore", hasScore);
    if (scoreCalculator != null && scoreCalculator.getSumOfScoreNodes() != null && scoreCalculator.getSumOfScoreNodes().size() > 0) {
      hasScore.select(Boolean.TRUE.toString(), true);
    } else {
      hasScore.select(Boolean.FALSE.toString(), true); // default
    }

    // assessable child nodes
    scoreNodeIdents = initNodeSelectionElement("scform.scoreNodeIndents", scoreCalculator, (scoreCalculator == null ? null
        : scoreCalculator.getSumOfScoreNodes()), nodeIdentList);
    addFormElement("scoreNodeIdents", scoreNodeIdents);

    SpacerElement spacer = new SpacerElement(true, false);
    addFormElement("spacer", spacer);

    // passed configuration

    String[] passedTypeKeys = new String[] { ScoreCalculator.PASSED_TYPE_NONE, ScoreCalculator.PASSED_TYPE_CUTVALUE,
        ScoreCalculator.PASSED_TYPE_INHERIT };
    String[] passedTypeValues = new String[] { translate("no"), translate("scform.passedtype.cutvalue"),
        translate("scform.passedtype.inherit") };

    passedType = new StaticSingleSelectionElement("scform.passedtype", passedTypeKeys, passedTypeValues);
    addFormElement("passedType", passedType);
    if (scoreCalculator != null && scoreCalculator.getPassedType() != null) {
      passedType.select(scoreCalculator.getPassedType(), true);
    } else {
      passedType.select(ScoreCalculator.PASSED_TYPE_NONE, true); // default
View Full Code Here

    for (Iterator iter = columns.iterator(); iter.hasNext();) {
      cKeys[i] = Integer.toString(i);
      cValues[i] = (String)iter.next();
      i++;
    }
    colSelElement = new StaticSingleSelectionElement("form.step3.columns", cKeys, cValues);
    colSelElement.select("0",true);
    addFormElement("form.step3.columns", colSelElement);
   
    int sizeBulkActions = bulkActions.size();
    String[] fKeys = new String[sizeBulkActions];
    String[] fValues = new String[sizeBulkActions];
    int j = 0;
    for (Iterator iter = bulkActions.iterator(); iter.hasNext();) {
      fKeys[j] = Integer.toString(j);
      BulkAction ba = (BulkAction) iter.next();
      fValues[j] = ba.getDisplayName();
      j++;
    }
    bulkSelElement = new StaticSingleSelectionElement("form.step3.bulkactions", fKeys, fValues);
    bulkSelElement.select("0",true);
    addFormElement("form.step3.bulkactions", bulkSelElement);
   
    addSubmitKey("next"); // wizard style
View Full Code Here

  public SystemRolesAndRightsForm(String name, Translator translator, String institution) {
    super(name, translator);
    // 1) general accout type
    String[] isAnonymousKeys = {"true", "false"};
    String[] isAnonymousValues = {translate("rightsForm.isAnonymous.true"), translate("rightsForm.isAnonymous.false")};
    isAnonymous = new StaticSingleSelectionElement("rightsForm.isAnonymous", isAnonymousKeys, isAnonymousValues);
    // 2) system roles
    isUsermanager = new CheckBoxElement("rightsForm.isUsermanager");
    isGroupmanager = new CheckBoxElement("rightsForm.isGroupmanager");
    isAuthor = new CheckBoxElement("rightsForm.isAuthor");
    isAdmin = new CheckBoxElement("rightsForm.isAdmin");
View Full Code Here

  }

  private StaticSingleSelectionElement createStatusSelectionElement() {
    String[] statusKeys = { Integer.toString(Identity.STATUS_ACTIV), Integer.toString(Identity.STATUS_PERMANENT), Integer.toString(Identity.STATUS_LOGIN_DENIED) };
    String[] statusValues = { translate("rightsForm.status.activ"), translate("rightsForm.status.permanent"), translate("rightsForm.status.login_denied") };
    return new StaticSingleSelectionElement("rightsForm.status", statusKeys, statusValues);
  }
View Full Code Here

 
  public void setStatus(Integer status) {
    if (status == Identity.STATUS_DELETED) {
      String[] statusKeys = { Identity.STATUS_DELETED.toString() };
      String[] statusValues = {translate("rightsForm.status.deleted")};
      statusSelectionElement = new StaticSingleSelectionElement("rightsForm.status", statusKeys, statusValues);
      statusSelectionElement.setReadOnly(true);
    } else {
      statusSelectionElement = createStatusSelectionElement();
    }
    statusSelectionElement.select( status.toString(), true );
View Full Code Here

    for (Iterator iter = columns.iterator(); iter.hasNext();) {
      cKeys[j] = Integer.toString(j);
      cValues[j] = (String)iter.next();
      j++;
    }
    colSelElement = new StaticSingleSelectionElement("form.step2.columns", cKeys, cValues);
    colSelElement.select("0",true);
    addFormElement("form.step2.columns", colSelElement);
   
    int sizeOlKs = olatKeys.size();
    String[] oKeys = new String[sizeOlKs];
    String[] oValues = new String[sizeOlKs];
    int i = 0;
    for (Iterator iter = olatKeys.iterator(); iter.hasNext();) {
      oKeys[i] = Integer.toString(i);
      oValues[i] = (String)iter.next();
      i++;
    }
    keySelElement = new StaticSingleSelectionElement("form.step2.olatkeys", oKeys, oValues);
    keySelElement.select("0",true);
    addFormElement("form.step2.olatkeys", keySelElement);
   
    addSubmitKey("next"); // wizard style
View Full Code Here

        Boolean.FALSE.toString() };
    String[] iframeValues = new String[] {
        translate(NLS_DISPLAY_CONFIG_IFRAME_TRUE),
        translate(NLS_DISPLAY_CONFIG_IFRAME_FALSE) };
   
    iframeE = new StaticSingleSelectionElement(NLS_DISPLAY_CONFIG_IFRAME, iframeKeys, iframeValues);
   
    // in iFrame switch
    if (initiallyChecked) {
      iframeE.select(Boolean.TRUE.toString(), true);
    } else {
      iframeE.select(Boolean.FALSE.toString(), true);
    }
    addFormElement("iframe", iframeE);
   
    // stateful switch
    String[] statefulKeys = new String[] {
        Boolean.TRUE.toString(),
        Boolean.FALSE.toString(),
        SPEditController.KEY_TRUE_WITHOUT_HOMELINK };
    String[] statefulValues = new String[] {
        translate(NLS_DISPLAY_CONFIG_STATEFUL_TRUE),
        translate(NLS_DISPLAY_CONFIG_STATEFUL_FALSE),
        translate(NLS_DISPLAY_CONFIG_STATEFUL_TRUEWITHOUT) };
   
    statefulMicroWeb = new StaticSingleSelectionElement(NLS_DISPLAY_CONFIG_STATEFUL, statefulKeys, statefulValues);
    statefulMicroWeb.select(stateful, true);
    addFormElement("microWeb", statefulMicroWeb);
   
    // enable statefulMicroWeb only if the page is not displayed in an iframe.
    VisibilityDependsOnSelectionRule rule = new VisibilityDependsOnSelectionRule(iframeE, statefulMicroWeb, Boolean.FALSE.toString(), true, Boolean.FALSE.toString(), false);
View Full Code Here

  private StaticSingleSelectionElement createStatusSelectionElement() {
    String[] statusKeys = { Integer.toString(Identity.STATUS_VISIBLE_LIMIT), Integer.toString(Identity.STATUS_ACTIV),
        Integer.toString(Identity.STATUS_PERMANENT), Integer.toString(Identity.STATUS_LOGIN_DENIED) };
    String[] statusValues = { translate("rightsForm.status.any.visible"), translate("rightsForm.status.activ"),
        translate("rightsForm.status.permanent"), translate("rightsForm.status.login_denied") };
    return new StaticSingleSelectionElement("rightsForm.status", statusKeys, statusValues);
  }
View Full Code Here

          translate("cif.access.owners"),
          translate("cif.access.owners_authors"),
          translate("cif.access.users"),
          translate("cif.access.users_guests"),
        };
    access = new StaticSingleSelectionElement("cif.access", keys, values);
    access.select("" + entry.getAccess(), true);
    addFormElement("cif_access", access)
   
   
    addSubmitKey("submit", "submit");
View Full Code Here

TOP

Related Classes of org.olat.core.gui.formelements.StaticSingleSelectionElement

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.