Package org.olat.core.gui.components.form.flexible.elements

Examples of org.olat.core.gui.components.form.flexible.elements.SingleSelection.select()


      // is the same as the current row count
      addRowAt(row);
      try {
        // set value in attribute selection
        SingleSelection ssi = (SingleSelection) flc.getFormComponent((String) columnAttribute.get(row));
        ssi.select(extendedCondition.getAttribute(), true);
        // set value in operator selection
        ssi = (SingleSelection) flc.getFormComponent((String) columnOperator.get(row));
        ssi.select(extendedCondition.getOperator().getOperatorKey(), true);
        // set the selectable values for this attribute if available and set the
        // preselected / predefined value.
View Full Code Here


        // set value in attribute selection
        SingleSelection ssi = (SingleSelection) flc.getFormComponent((String) columnAttribute.get(row));
        ssi.select(extendedCondition.getAttribute(), true);
        // set value in operator selection
        ssi = (SingleSelection) flc.getFormComponent((String) columnOperator.get(row));
        ssi.select(extendedCondition.getOperator().getOperatorKey(), true);
        // set the selectable values for this attribute if available and set the
        // preselected / predefined value.
        String attribute = extendedCondition.getAttribute();
        updateValueElementForAttribute(attribute, row, extendedCondition.getValue());
      } catch (Exception e) {
View Full Code Here

      iselect.setKeysAndValues(selectableKeys, guiTranslatedKeys, null);
      // set user value
      if (value != null) {
        // check if stored value exists, otherwise don't select anything
        if (Arrays.asList(selectableKeys).contains(value)) {
          iselect.select(value, true);
        } else {
          // ups, maybe this value has been removed from the list? maybe a programming error?
          logWarn("could not select value::" + value + " for shibboleth attribute::" + attribute
              + " in course easy mode, not found in selectable list", null);
        }
View Full Code Here

    String[] values = new String[keys.length];
    for (int i = 0; i < keys.length; i++) {
      values[i] = translate(keys[i]);
    }
    SingleSelection mode = uifactory.addDropdownSingleselect("modus" + counter, "form.enableCancelEnroll", titleContainer, keys, values, null);
    mode.select(checkpoint.getMode(), checkpoint.getMode() != null);
    mode.setUserObject(checkpoint);
    modeInputList.add(index, mode);
   
    // add link add action button
    FormLink addButton = new FormLinkImpl("add" + counter, "add" + counter, "cl.table.add", Link.BUTTON_SMALL);
View Full Code Here

        uifactory.addStaticTextElement("customField_label" + customFieldIndex, null, customField.getName(), formLayout);//null > no label
        SingleSelection selectionElement = uifactory.addDropdownSingleselect("customField_" + customFieldIndex, null, formLayout, theKeys, theValues, null);
        if (project.getCustomFieldValue(customFieldIndex) != null && !project.getCustomFieldValue(customFieldIndex).equals("")) {
          if (valueList.contains(project.getCustomFieldValue(customFieldIndex))) {     
            String key = Integer.toString(valueList.indexOf(project.getCustomFieldValue(customFieldIndex)) + 1);// '+1' because no-selection at the beginning
            selectionElement.select(key, true);
          } else {
            this.showInfo("warn.customfield.key.does.not.exist",project.getCustomFieldValue(customFieldIndex));
          }
        }
        customfieldElementList.add(selectionElement);
View Full Code Here

        // Add StaticTextElement as workaround for non translated label
        uifactory.addStaticTextElement("customField_label" + customFieldIndex, null, customField.getName(), formLayout);
        SingleSelection selectionElement = uifactory.addDropdownSingleselect("customField_" + customFieldIndex, null, formLayout, theKeys, theValues, null);
        if (project.getCustomFieldValue(customFieldIndex) != null && !project.getCustomFieldValue(customFieldIndex).equals("")) {
          if (valueList.contains(project.getCustomFieldValue(customFieldIndex))) {
            selectionElement.select(project.getCustomFieldValue(customFieldIndex), true);
          } else {
            this.showInfo("warn.customfield.key.does.not.exist",project.getCustomFieldValue(customFieldIndex));
          }
        }
        customfieldElementList.add(selectionElement);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.