Tag optionsCollection

Render a Collection of Select Options

Renders a set of HTML <option> elements, representing possible choices for a <select> element. This tag can be used multiple times within a single <html:select> element, either in conjunction with or instead of one or more <html:option> or <html:options> elements.

This tag operates on a collection of beans, where each bean has a label property and a value property. The actual names of these properties can be configured using the label and value attributes of this tag.

This tag differs from the <html:options> tag in that it makes more consistent use of the name and property attributes, and allows the collection to be more easily obtained from the enclosing form bean.

Note that this tag does not support a styleId attribute, as it would have to apply the value to all the option elements created by this element, which would mean that more than one id element might have the same value, which the HTML specification says is illegal.

Tag Information
Tag Classorg.apache.struts.taglib.html.OptionsCollectionTag
TagExtraInfo ClassNone
Body Contentempty
Display NameNone

filterfalsetruebooleanSet to false if you do NOT want the option labels filtered for sensitive characters in HTML. By default, such values are filtered.
labelfalsetruejava.lang.StringThe property of the bean within the collection which represents the label to be rendered for each option. Defaults to "label".
namefalsetruejava.lang.StringThe attribute name of the bean whose properties are consulted when rendering the current value of this input field. If not specified, the bean associated with the form tag we are nested within is utilized.
propertyfalsetruejava.lang.StringThe property of the form bean, or the bean specified by the name attribute, that will return the collection of objects to be rendered for these options.
stylefalsetruejava.lang.StringCSS styles to be applied to this HTML element.
styleClassfalsetruejava.lang.StringCSS stylesheet class to be applied to this HTML element (renders a "class" attribute).
valuefalsetruejava.lang.StringThe property of the bean within the collection which represents the value to be rendered for each option. Defaults to "value".

No Variables Defined.

Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.