Professional Jakarta Struts (Programmer to Programmer)
|
| < Day Day Up > |
|
<html:optionsCollection />
The <html:optionsCollection /> tag (as a child of the <html:select /> tag) is used to generate a list of HTML <option> elements from a collection of JavaBeans. The <html:optionsCollection /> tag has no body and supports seven attributes, described in Table 16.18.
| Attribute | Description |
|---|---|
| property | Indicates the property of the ActionForm bean or scripting variable named by the name attribute that will contain the collection of objects to be used for each <option> element. (required) |
| filter | If true, then all special HTML characters will be filtered from the element. (optional) |
| label | Indicates the data member name of the current object in the collection that represents the <option> label. (optional) |
| name | Indicates the name of the JavaBean representing the contents of this input field. If not included, then the ActionForm named by the <html:form /> tag is used. (optional) |
| style | Specifies a Cascading Style Sheet style to apply to this HTML element. (optional) |
| styleClass | Specifies a Cascading Style Sheet class to apply to this HTML element. (optional) |
| value | Indicates the data member name of the current object in the collection that represents the <option> value. (optional) |
The <html:optionsCollection /> tag must be nested inside an <html:select /> tag. The <html:optionsCollections /> tag can also be used n-number of times within an <html:select /> element.
|
| < Day Day Up > |
|