Replaces the select options with the given options.<p>

@param options the map of select options (keys are option values, values are option descriptions)
519353
private void replaceOptions(LinkedHashMap<String, String> options) {

        String oldValue = m_selectBox.getFormValueAsString();
        for (String additionalValue : new String[] {oldValue, m_externalValue}) {
            if (!options.containsKey(additionalValue)) {
                options.put(additionalValue, additionalValue);
            }
        }
        if (options.containsKey("")) {
            options.put(
                "",
                org.opencms.gwt.client.Messages.get().key(
                    org.opencms.gwt.client.Messages.GUI_SELECTBOX_EMPTY_SELECTION_0));
        }
        m_selectBox.setItems(options);
        m_selectBox.setFormValueAsString(oldValue);
    }
1227067
public void modifyOptions(Map<String, Object> options) throws ProvisioningApiException {
        try {

            OptionsPostResponseStatusSuccess resp = optionsApi.optionsPost(new OptionsPost().data(new OptionsPostData().options(options)));

            if (!resp.getStatus().getCode().equals(0)) {
                throw new ProvisioningApiException("Error modifying options. Code: " + resp.getStatus().getCode());
            }

        } catch (ApiException e) {
            throw new ProvisioningApiException("Error modifying options", e);
        }
    }
697674
public void select(String[] optionLocators) {
        for (int i = 0; i < optionLocators.length; i++) {
            select(optionLocators[i]);
        }
    }
1303883
public void setTagOptions(java.util.Collection<TagOptionDetail> tagOptions) {
        if (tagOptions == null) {
            this.tagOptions = null;
            return;
        }

        this.tagOptions = new java.util.ArrayList<TagOptionDetail>(tagOptions);
    }
647035
public void replaceValue(List<CmsDataViewValue> replacementValues) {

        CmsAttributeHandler handler = (CmsAttributeHandler)m_handler;
        Element parent = CmsDomUtil.getAncestor(
            m_widget.getElement(),
            I_CmsLayoutBundle.INSTANCE.form().attributeValue()).getParentElement();
        NodeList<Node> siblings = parent.getChildNodes();
        for (int j = 0; j < siblings.getLength(); j++) {
            Node node = siblings.getItem(j);
            if (node instanceof Element) {
                Element elem = (Element)node;
                if (elem.isOrHasChild(m_widget.getElement())) {
                    m_index = j;
                    break;
                }
            }
        }
        Panel container = handler.removeAttributeValueAndReturnPrevParent(m_index, true);
        int i = m_index;
        for (CmsDataViewValue value : replacementValues) {
            CmsEntity entity = CmsEntityBackend.getInstance().createEntity(null, m_entity.getTypeName());

            writeValueToEntity(value, entity);

            // handler.addNewAttributeValue(entity);
            handler.insertNewAttributeValue(entity, i, container);
            i += 1;
        }

        handler.updateButtonVisisbility();
    }
506888
void setValue(String optionValue) {
      if (StringUtils.isNullOrBlank(optionValue) && isBoolean()) {

         this.value = true;

      } else if (!StringUtils.isNullOrBlank(optionValue)) {

         if (Collection.class.isAssignableFrom(type)) {

            Class<?> genericType = field == null
                                   ? String.class
                                   : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
            this.value = Convert.convert(optionValue, type, genericType);

         } else if (Map.class.isAssignableFrom(type)) {

            Class<?> keyType = field == null
                               ? String.class
                               : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[0];
            Class<?> valueType = field == null
                                 ? String.class
                                 : (Class<?>) ((ParameterizedType) field.getGenericType()).getActualTypeArguments()[1];
            this.value = Convert.convert(optionValue, type, keyType, valueType);

         } else {

            this.value = Convert.convert(optionValue, type);

         }

      }


   }
798059
function (options) {
		
		var selectFieldConfig, operators, labels, selectOptions, newOptions, i, length;
		
		selectFieldConfig = this.generateSelectConfig(options.availableFields);
		
		operators = options.operators || ["=", ">", "<", ">=", "<=", "!=", "LIKE", "NOT LIKE", "IS NULL", "IS NOT NULL"];
		labels = options.operatorLabels || operators;
		
		selectOptions = [];
		
		for (i = 0, length = operators.length; i < length; i += 1) {
			selectOptions.push({ value: operators[i], label: labels[i] });
		}
		
		newOptions = {
			fields: [
				selectFieldConfig,
				{type: 'select', choices: selectOptions},
				this.nameIndex[options.availableFields[0].name]
			]
		};
		
		YAHOO.lang.augmentObject(newOptions, options);
		
		inputEx.KeyValueField.superclass.setOptions.call(this, newOptions);
	}
78168
public CliCommandBuilder addJavaOptions(final String... javaOpts) {
        if (javaOpts != null) {
            for (String javaOpt : javaOpts) {
                addJavaOption(javaOpt);
            }
        }
        return this;
    }
736159
function(options) {
		
		var selectFieldConfig = this.generateSelectConfig(options.availableFields);
	
		var newOptions = {
			fields: [
				selectFieldConfig,
				this.nameIndex[options.availableFields[0].name]
			]
		};
		
		YAHOO.lang.augmentObject(newOptions, options);
		
		inputEx.KeyValueField.superclass.setOptions.call(this, newOptions);
	}
277089
protected List<String> createOption(final String option, final List<String> values) {
        if (values == null){
            return new ArrayList<String>();
        }
        final List<String> list = new ArrayList<String>();
        for (String value: values) {
            list.add(option);
            list.add(value);
        }
        return list;
    }
64225
protected void opts(String[] opts) {
        if(opts.length < 1) {
            sendResponse(501, "Missing parameters");
            return;
        }

        String option = opts[0].toUpperCase();

        if(!options.containsKey(option)) {
            sendResponse(501, "No option found");
        } else if(opts.length < 2) {
            sendResponse(200, options.get(option));
        } else {
            options.put(option, opts[1].toUpperCase());
            sendResponse(200, "Option updated");
        }
    }
1257976
@SuppressWarnings("unchecked")
	public OptionsBuilder includes(String... includes) {
		return includes != null ? includes(Arrays.asList(includes)) : this;
	}
1144488
private void replaceOptions(CmsSelectConfigurationParser parser) {

        String oldValue = m_selectBox.getFormValueAsString();
        // set the help info first!!
        for (Entry<String, String> helpEntry : parser.getHelpTexts().entrySet()) {
            m_selectBox.setTitle(helpEntry.getKey(), helpEntry.getValue());
        }
        //set value and option to the combo box.
        m_selectBox.setItems(parser.getOptions());
        //if one entrance is declared for default.
        if (parser.getDefaultValue() != null) {
            //set the declared value selected.
            m_selectBox.selectValue(parser.getDefaultValue());
        }
        m_selectBox.setFormValueAsString(oldValue);
    }
84283
public void setScaleOptions(CmsObject cms, String scaleOptions) {

        if (CmsStringUtil.isEmptyOrWhitespaceOnly(scaleOptions)) {
            m_scaleOptions = "";
            if (m_element.element(NODE_SCALE) != null) {
                m_element.remove(m_element.element(NODE_SCALE));
            }
        } else {
            m_scaleOptions = scaleOptions;
        }
        setParameterValue(cms, CmsImageScaler.PARAM_SCALE, scaleOptions);
    }
1169931
public void appendOption(String... option) {
        options = Arrays.copyOf(options, options.length + 1);
        options[options.length - 1] = option;
    }
27790
private void replaceItems(Map<String, String> items) {

        String oldValue = m_selectBox.getFormValueAsString();
        //set value and option to the combo box.
        m_selectBox.setItems(items);
        if (items.containsKey(oldValue)) {
            m_selectBox.setFormValueAsString(oldValue);
        }
    }
556368
public void addChoice (Object choice)
    {
        String name = (choice == null) ? "null" : choice.toString();
        addChoice(new Choice(name, choice));
    }