The <listoptions> Tag

Purpose

The <listoptions> tag renders a set of select options obtained from a list model, which has been specified in the enclosing <select> tag.

Requirements

A <listoptions> tag has to be embedded in a <select> tag with an attached list model.

Attributes

Attribute groups: %coreattrs, %i18n and %events.

NameDescription
disabled Mapped to the HTML attribute of the same name.
selection May be used to specify one or more list model keys to be used as a default selection when no current selection is available. The specified value must of type String or String[].
sort Determines the sorting parameter used to bring the rendered option entries into an appropriate order. Possible values are
  • "index" - Default. The natural order defined by the list model.
  • "key" - The entries are ordered by their key strings (lexicographically).
  • "value" - The entries are ordered by their value objects (as comparables).
  • "label" - The entries are ordered by their label strings (lexicographically).
Each of the above choices may be preceded by a minus sign (for example "-label") to receive a descending order instead of an ascending one.

Body

The <listoptions> tag has no body.

Related tags

<select>, <listoption>, <option>