html
Tag option


Render A Select Option

Render an HTML <option> element, representing one of the choices for an enclosing <select> element. The text displayed to the user comes from either the body of this tag, or from a message string looked up based on the bundle, locale, and key attributes.

If the value of the corresponding bean property matches the specified value, this option will be marked selected. This tag is only valid when nested inside a <html:select> tag body.



Tag Information
Tag Classorg.apache.struts.taglib.html.OptionTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
bundle
The servlet context attributes key for the MessageResources instance to use. If not specified, defaults to the application resources configured for our action servlet.
 
Required: false
Request-time: false
Type: java.lang.String
dir

The direction for weak/neutral text for this element.

Since:
Struts 1.3.6
 
Required: false
Request-time: false
Type: java.lang.String
disabled
Set to true if this option should be disabled.
 
Required: false
Request-time: false
Type: java.lang.String
filter
Set to true if you want the option label to be filtered for sensitive characters in HTML. By default, such a value is NOT filtered.
 
Required: false
Request-time: false
Type: java.lang.String
lang

The language code for this element.

Since:
Struts 1.3.6
 
Required: false
Request-time: false
Type: java.lang.String
key
If specified, defines the message key to be looked up in the resource bundle specified by bundle for the text displayed to the user for this option. If not specified, the text to be displayed is taken from the body content of this tag.
 
Required: false
Request-time: false
Type: java.lang.String
locale
The session attributes key for the Locale instance to use for looking up the message specified by the key attribute. If not specified, uses the standard Struts session attribute name.
 
Required: false
Request-time: false
Type: java.lang.String
style
CSS styles to be applied to this HTML element.
 
Required: false
Request-time: false
Type: java.lang.String
styleId
Identifier to be assigned to this HTML element (renders an "id" attribute).
 
Required: false
Request-time: false
Type: java.lang.String
styleClass
CSS stylesheet class to be applied to this HTML element (renders a "class" attribute).
 
Required: false
Request-time: false
Type: java.lang.String
value
Value to be submitted for this field if this option is selected by the user.
 
Required: true
Request-time: false
Type: java.lang.String

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.