Stripes Tag Library
Tag options-enumeration


Writes a set of <option value="foo">bar</option> tags to the page based on the values of a enum. Each value in the enum is represented by a single option tag on the page. The options will be generated in ordinal value order (i.e. the order they are declared in the enum).

The label (the value the user sees) is generated in one of three ways: by looking up a localized value, by using the property named by the 'label' tag attribute if it is supplied and lastly by toString()'ing the enumeration value. For example the following tag:

<stripes:options-enumeration enum="net.kitty.EyeColor" label="description"/>
when generating the option for the value EyeColor.BLUE will look for a label in the following order:

If the class specified does not exist, or does not specify a Java 1.5 enum then a JspException will be raised.

All attributes of the tag, other than enum and label, are passed directly through to the <stripes:option/> which is used to generate the individual HTML options tags. As a result the <stripes:options-enumeration/> 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.



Tag Information
Tag Classnet.sourceforge.stripes.tag.InputOptionsEnumerationTag
TagExtraInfo ClassNone
Body Contentempty
Display Nameoptions-enumeration

Attributes
NameRequiredRequest-timeTypeDescription
enumtruetruejava.lang.String The fully qualified name of a Class that is a JDK1.5 enum.
labelfalsetruejava.lang.String The name of the property to be used at the label of each option. If not specifed, and no localized value can be found, the toString() method will be called on the enumerated objects to supply the user-visible text.
sortfalsetruejava.lang.String A comma separated list of bean properties by which the enum values should be sorted before rendering the options. Special values of 'label' and 'value' indicate that the options should be sorted by the label and value respectively - even when using localized or derived values.
groupfalsetruejava.lang.String The name of the property which will be used to generate <optgroup> tags. Each time a new value is encountered an optgroup will be written for it.
accesskeyfalsetruejava.lang.StringKeyboard shortcut to access the element. (HTML Pass-through)
classfalsetruejava.lang.StringThe CSS class to be applied to the element. (HTML Pass-through)
dirfalsetruejava.lang.StringText direction. (HTML Pass-through)
idfalsetruejava.lang.StringA unique identifier for the HTML tag on the page. (HTML Pass-through)
langfalsetruejava.lang.StringThe language code of the element. (HTML Pass-through)
onblurfalsetruejava.lang.StringScripting code run when the element loses focus. (HTML Pass-through)
onchangefalsetruejava.lang.StringScripting code run when the element changes. (HTML Pass-through)
onclickfalsetruejava.lang.StringScripting code run on each mouse click. (HTML Pass-through)
ondblclickfalsetruejava.lang.StringScripting code run on a double-click of the mouse. (HTML Pass-through)
onfocusfalsetruejava.lang.StringScripting code run when the element acquires focus. (HTML Pass-through)
onkeydownfalsetruejava.lang.StringScripting code run when a key is depressed. (HTML Pass-through)
onkeypressfalsetruejava.lang.StringScripting code run when a key is pressed and released. (HTML Pass-through)
onkeyupfalsetruejava.lang.StringScripting code run when a key is released. (HTML Pass-through)
onmousedownfalsetruejava.lang.StringScripting code run when a mouse button is depressed. (HTML Pass-through)
onmousemovefalsetruejava.lang.StringScripting code run when the mouse pointer is moved. (HTML Pass-through)
onmouseoutfalsetruejava.lang.StringScripting code run when the mouse pointer moves out of the element. (HTML Pass-through)
onmouseoverfalsetruejava.lang.StringScripting code run when the mouse pointer moves over the element. (HTML Pass-through)
onmouseupfalsetruejava.lang.StringScripting code run when a mouse button is released. (HTML Pass-through)
onselectfalsetruejava.lang.StringScripting code run when an element is selected. (HTML Pass-through)
stylefalsetruejava.lang.StringInline CSS style fragment that applies to the element (HTML Pass-through)
tabindexfalsetruejava.lang.StringThe tab order of the element. (HTML Pass-through)
titlefalsetruejava.lang.StringTool-tip text for the element. (HTML Pass-through)

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