Writes a set of <option value="foo">bar</option> tags to the
page based on the contents of a Collection. Each element in the collection is
represented by a single option tag on the page. Uses the label and value attributes
on the tag to name the properties of the objects in the Collection that should be used
to generate the body of the HTML option tag and the value attribute of the HTML option
tag respectively. If either (or both) of the label or value properties are ommitted
the item itself will be used for the label/value instead - this is done to support
collections of simple types like Strings and Numbers.
E.g. a tag declaration that looks like:
would cause the container to look for a Collection called "cats" across
the various JSP scopes and set it on the tag. The tag would then proceed to iterate
through that collection calling getCatId() and getName() on each cat to produce
HTML option tags.
All other attributes on the tag (other than collection, value and label) are passed
directly through to the stripes:option tag which is used to generate the individual
HTML options tags. As a result the stripes:options-collection will exhibit the
same re-population/selection behaviour as the regular options tag.
Since the tag has no use for one it does not allow a body.
| Attributes |
| Name | Required | Request-time | Type | Description |
| value | false | true | java.lang.String |
The name of the property (of the beans in the collection) that should be used to
generate the value of each option (i.e. the value that is sent to the server).
|
| label | false | true | java.lang.String |
The name of the property (of the beans in the collection) that should be used to
generate the label of each option (i.e. the text displayed to the user).
|
| collection | true | true | java.util.Collection |
The collection of beans to use to generate options. This value must resolve to
a Collection, and therefore it will most often be an EL expression
(or a scriptlet, if you must).
|
| accesskey | false | true | java.lang.String | Keyboard shortcut to access the element. (HTML Pass-through) |
| class | false | true | java.lang.String | The CSS class to be applied to the element. (HTML Pass-through) |
| dir | false | true | java.lang.String | Text direction. (HTML Pass-through) |
| id | false | true | java.lang.String | A unique identifier for the HTML tag on the pgae. (HTML Pass-through) |
| lang | false | true | java.lang.String | The language code of the element. (HTML Pass-through) |
| onblur | false | true | java.lang.String | Scripting code run when the element loses focus. (HTML Pass-through) |
| onchange | false | true | java.lang.String | Scripting code run when the element changes. (HTML Pass-through) |
| onclick | false | true | java.lang.String | Scripting code run on each mouse click. (HTML Pass-through) |
| ondblclick | false | true | java.lang.String | Scripting code run on a double-click of the mouse. (HTML Pass-through) |
| onfocus | false | true | java.lang.String | Scripting code run when the element acquires focus. (HTML Pass-through) |
| onkeydown | false | true | java.lang.String | Scripting code run when a key is depressed. (HTML Pass-through) |
| onkeypress | false | true | java.lang.String | Scripting code run when a key is pressed and released. (HTML Pass-through) |
| onkeyup | false | true | java.lang.String | Scripting code run when a key is released. (HTML Pass-through) |
| onmousedown | false | true | java.lang.String | Scripting code run when a mouse button is depressed. (HTML Pass-through) |
| onmousemove | false | true | java.lang.String | Scripting code run when the mouse pointer is moved. (HTML Pass-through) |
| onmouseout | false | true | java.lang.String | Scripting code run when the mouse pointer moves out of the element. (HTML Pass-through) |
| onmouseover | false | true | java.lang.String | Scripting code run when the mouse pointer moves over the element. (HTML Pass-through) |
| onmouseup | false | true | java.lang.String | Scripting code run when a mouse button is released. (HTML Pass-through) |
| onselect | false | true | java.lang.String | Scripting code run when an element is selected. (HTML Pass-through) |
| style | false | true | java.lang.String | Inline CSS style fragment that applies to the element (HTML Pass-through) |
| tabindex | false | true | java.lang.String | The tab order of the element. (HTML Pass-through) |
| title | false | true | java.lang.String | Tool-tip text for the element. (HTML Pass-through) |