html:optionsCollection

 < 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.

Table 16.18: <html:optionsCollections/> Tag Attributes

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)

start sidebar

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.

end sidebar



 < Day Day Up > 



Professional Jakarta Struts
Professional Jakarta Struts (Programmer to Programmer)
ISBN: 0764544373
EAN: 2147483647
Year: 2003
Pages: 183

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net