open class OptionTag : AbstractHtmlElementBodyTag, BodyTag
The <option>
tag renders a single HTML 'option'. Sets 'selected' as appropriate based on bound value.
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.
Attribute Summary Attribute Required? Runtime Expression? Description
cssClass
false
true
HTML Optional Attribute
cssErrorClass
false
true
HTML Optional Attribute. Used when the bound field has errors.
cssStyle
false
true
HTML Optional Attribute
dir
false
true
HTML Standard Attribute
disabled
false
true
HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element.
htmlEscape
false
true
Enable/disable HTML escaping of rendered values.
id
false
true
HTML Standard Attribute
label
false
true
HTML Optional Attribute
lang
false
true
HTML Standard Attribute
onclick
false
true
HTML Event Attribute
ondblclick
false
true
HTML Event Attribute
onkeydown
false
true
HTML Event Attribute
onkeypress
false
true
HTML Event Attribute
onkeyup
false
true
HTML Event Attribute
onmousedown
false
true
HTML Event Attribute
onmousemove
false
true
HTML Event Attribute
onmouseout
false
true
HTML Event Attribute
onmouseover
false
true
HTML Event Attribute
onmouseup
false
true
HTML Event Attribute
tabindex
false
true
HTML Standard Attribute
title
false
true
HTML Standard Attribute
value
true
true
HTML Optional Attribute
Author
Rob Harrop
Author
Juergen Hoeller
Since
2.0
OptionTag()
The Must be used nested inside a SelectTag. Provides full support for databinding by marking an ' The An optional Attribute Summary Attribute Required? Runtime Expression? Description cssClass false true HTML Optional Attribute cssErrorClass false true HTML Optional Attribute. Used when the bound field has errors. cssStyle false true HTML Optional Attribute dir false true HTML Standard Attribute disabled false true HTML Optional Attribute. Setting the value of this attribute to 'true' will disable the HTML element. htmlEscape false true Enable/disable HTML escaping of rendered values. id false true HTML Standard Attribute label false true HTML Optional Attribute lang false true HTML Standard Attribute onclick false true HTML Event Attribute ondblclick false true HTML Event Attribute onkeydown false true HTML Event Attribute onkeypress false true HTML Event Attribute onkeyup false true HTML Event Attribute onmousedown false true HTML Event Attribute onmousemove false true HTML Event Attribute onmouseout false true HTML Event Attribute onmouseover false true HTML Event Attribute onmouseup false true HTML Event Attribute tabindex false true HTML Standard Attribute title false true HTML Standard Attribute value true true HTML Optional Attribute |
static val DISPLAY_VALUE_VARIABLE_NAME: String
The name of the JSP variable used to expose the display value for this tag. |
|
static val VALUE_VARIABLE_NAME: String
The name of the JSP variable used to expose the value for this tag. |
open fun setDisabled(disabled: Boolean): Unit
Set the value of the ' |
|
open fun setLabel(label: String): Unit
Set the text body of the rendered HTML May be a runtime expression. |
|
open fun setValue(value: Any): Unit
Set the 'value' attribute of the rendered HTML |
open fun doEndTag(): Int
If |
|
open fun doFinally(): Unit
Clean up any attributes and stored resources. |
|
open fun doInitBody(): Unit |
|
open fun setBodyContent(bodyContent: BodyContent): Unit |