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

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


        MultipleSelectionElement checkbox = iterator.next();
        if (checkbox.isSelected(0)) {
          FormItem formItem = formItems.get(i);
          // first get the values from the hardcoded items
          if (formItem.getName().equals(UserBulkChangeManager.LANG_IDENTIFYER)) {
            SingleSelection selectField = (SingleSelection) formItem;
            attributeChangeMap.put(UserBulkChangeManager.LANG_IDENTIFYER, selectField.getSelectedKey());           
          } else if (formItem.getName().equals(UserBulkChangeManager.PWD_IDENTIFYER)) {
            TextElement propertyField = (TextElement) formItem;
            attributeChangeMap.put(UserBulkChangeManager.PWD_IDENTIFYER, propertyField.getValue());           
          }         
          // second get the values from all configured user properties
View Full Code Here


          theKeys[arrayIndex]=Integer.toString(arrayIndex);
          arrayIndex++;
        }
        // Add StaticTextElement as workaround for non translated label
        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

      String value = "";
      if (element instanceof TextElement) {
        TextElement textElement = (TextElement)element;
        value = textElement.getValue();
      } else if (element instanceof SingleSelection) {
        SingleSelection selectionElement = (SingleSelection)element;
        if (!selectionElement.getSelectedKey().equals(DROPDOWN_NO_SELECETION)) {
          value = selectionElement.getValue(selectionElement.getSelected());
        } else {
          value = "";
        }
      }
      getLogger().debug("customfield index=" + index + " value=" + value + " project.getCustomFieldValue(index)=" + project.getCustomFieldValue(index));
View Full Code Here

          theKeys[arrayIndex]=value;
          arrayIndex++;
        }
        // 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

      String value = "";
      if (element instanceof TextElement) {
        TextElement textElement = (TextElement)element;
        value = textElement.getValue();
      } else if (element instanceof SingleSelection) {
        SingleSelection selectionElement = (SingleSelection)element;
        if (!selectionElement.getSelectedKey().equals(DROPDOWN_NO_SELECETION)) {
          value = selectionElement.getSelectedKey();
        } else {
          value = "";
        }
      }
      if (!project.getCustomFieldValue(index).equals(value)) {
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.form.flexible.elements.SingleSelection

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.