Select

Purpose

This component provides a form control that allows users to select one or more items from a list of options.

Exported Features

cf2:ui.Select

Imported Features

cf2:ObservablePropertySet

Markup

This component is provided by the ui:select element.

Properties

The following table lists the observable properties associated with this component.

Property Description Type Access
multiple Determines whether several items can be selected at the same time. The initial value of this property can be specified by the multiple attribute on the ui:select element. The value of the property defaults to 'false'. boolean read/write
value The value of the selected option. This is only valid when the multiple property is set to 'false', otherwise this is always null. String[] read/write
values The values of the selected options. The initial value of this property is constructed by iterating over the descendant ui:option elements and adding the value of their value attribute to the list if their selected attribute is set to 'true'. If the initial value of the multiple property is set to 'false', then it is a non-fatal error if the list contains more than one value, in which case the second and subsequence values are removed from the list. The list (represented as a JavaScript array) is the initial value of this property. It is a client-side error if an attempt is made to set this to an array containing more than one item when the multiple property is 'false'. String[] read/write

Markup

If this component is not supported, then it falls back to a static text area field.

Related topics