JSP tag for rendering an HTML 'option
' tag.
Must be used nested inside a SelectTag
.
Provides full support for databinding by marking an
'option
' as 'selected' if the value
matches the value bound to the out SelectTag
.
The value
property is required and corresponds to
the 'value
' attribute of the rendered 'option
'.
An optional label
property can be specified, the
value of which corresponds to inner text of the rendered
'option
' tag. If no label
is specified
then the value
property will be used when rendering
the inner text.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DISPLAY_VALUE_VARIABLE_NAME | The name of the JSP variable used to expose the display value for this tag. | |||||||||
String | VALUE_VARIABLE_NAME | The name of the JSP variable used to expose the value for this tag. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag | |||||||||||
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag | |||||||||||
From class org.springframework.web.servlet.tags.RequestContextAwareTag |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag | |||||||||||
From class org.springframework.web.servlet.tags.RequestContextAwareTag |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Set the value of the '
disabled ' attribute. | |||||||||||
Set the text body of the rendered HTML
<option> tag. | |||||||||||
Set the 'value' attribute of the rendered HTML
<option> tag. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Autogenerate the '
id ' attribute value for this tag. | |||||||||||
Called during
writeTagContent(TagWriter) allowing subclasses to add any attributes to the
javax.servlet.jsp.PageContext as needed. | |||||||||||
Get the
BindStatus for this tag. | |||||||||||
Get the value of the '
disabled ' attribute. | |||||||||||
Get the text body of the rendered HTML
<option> tag. | |||||||||||
Get the 'value' attribute of the rendered HTML
<option> tag. | |||||||||||
Is the current HTML tag disabled?
| |||||||||||
Make sure we are under a '
select ' tag before proceeding. | |||||||||||
Called by
doFinally() allowing subclasses to remove any attributes from the
javax.servlet.jsp.PageContext as needed. | |||||||||||
Render the tag contents based on the supplied BodyContent.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementBodyTag | |||||||||||
From class org.springframework.web.servlet.tags.form.AbstractHtmlElementTag | |||||||||||
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag | |||||||||||
From class org.springframework.web.servlet.tags.form.AbstractFormTag | |||||||||||
From class org.springframework.web.servlet.tags.HtmlEscapingAwareTag | |||||||||||
From class org.springframework.web.servlet.tags.RequestContextAwareTag | |||||||||||
From class
java.lang.Object
| |||||||||||
From interface org.springframework.web.servlet.tags.EditorAwareTag |
The name of the JSP variable used to expose the display value for this tag.
The name of the JSP variable used to expose the value for this tag.
Set the value of the 'disabled
' attribute.
May be a runtime expression.
disabled | the value of the 'disabled ' attribute
|
---|
Set the text body of the rendered HTML <option>
tag.
May be a runtime expression.
Set the 'value' attribute of the rendered HTML <option>
tag.
May be a runtime expression.
Autogenerate the 'id
' attribute value for this tag.
The default implementation simply delegates to getName()
,
deleting invalid characters (such as "[" or "]").
JspException |
---|
Called during writeTagContent(TagWriter)
allowing subclasses to add any attributes to the
javax.servlet.jsp.PageContext as needed.
JspException |
---|
Is the current HTML tag disabled?
true
if this tag is disabled
JspException |
---|
Make sure we are under a 'select
' tag before proceeding.
Called by doFinally()
allowing subclasses to remove any attributes from the
javax.servlet.jsp.PageContext as needed.
Render the tag contents based on the supplied BodyContent.
The default implementation simply flushes
the BodyContent directly to the output. Subclasses may choose to
override this to add additional content to the output.
JspException |
---|