Databinding-aware JSP tag for rendering an HTML 'form
' whose
inner elements are bound to properties on a form object.
Users should place the form object into the
ModelAndView
when
populating the data for their view. The name of this form object can be
configured using the "modelAttribute"
property.
The default value for the "modelAttribute"
property is 'command
' which corresponds to the default name
when using the
SimpleFormController
.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | DEFAULT_COMMAND_NAME | The default attribute name: "command" |
[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 |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MODEL_ATTRIBUTE_VARIABLE_NAME | The name of the javax.servlet.jsp.PageContext attribute under which the form object name is exposed. |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag | |||||||||||
From class org.springframework.web.servlet.tags.RequestContextAwareTag |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Closes the '
form ' block tag and removes the form object name
from the javax.servlet.jsp.PageContext. | |||||||||||
Clears the stored
TagWriter . | |||||||||||
Get the value of the '
target ' attribute. | |||||||||||
Set the value of the '
acceptCharset ' attribute. | |||||||||||
Set the value of the '
action ' attribute. | |||||||||||
Set the value of the '
autocomplete ' attribute. | |||||||||||
Set the name of the form attribute in the model.
| |||||||||||
Unsupported for forms.
| |||||||||||
Set the value of the '
enctype ' attribute. | |||||||||||
Set the value of the '
method ' attribute. | |||||||||||
Set the name of the request param for non-browser supported HTTP methods.
| |||||||||||
Set the name of the form attribute in the model.
| |||||||||||
Set the value of the '
name ' attribute. | |||||||||||
Set the value of the '
onreset ' attribute. | |||||||||||
Set the value of the '
onsubmit ' attribute. | |||||||||||
Unsupported for forms.
| |||||||||||
Set the value of the '
target ' attribute. |
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Autogenerated IDs correspond to the form object name.
| |||||||||||
Get the value of the '
acceptCharset ' attribute. | |||||||||||
Get the value of the '
action ' attribute. | |||||||||||
Get the value of the '
autocomplete ' attribute. | |||||||||||
Get the name of the form attribute in the model.
| |||||||||||
Get the value of the '
enctype ' attribute. | |||||||||||
Get the value of the '
method ' attribute. | |||||||||||
Get the name of the request param for non-browser supported HTTP methods.
| |||||||||||
Get the name of the form attribute in the model.
| |||||||||||
Get the value of the '
name ' attribute. | |||||||||||
Get the value of the '
onreset ' attribute. | |||||||||||
Get the value of the '
onsubmit ' attribute. | |||||||||||
Determine if the HTTP method is supported by browsers (i.e.
| |||||||||||
Resolve the value of the '
action ' attribute. | |||||||||||
Override resolve CSS class since error class is not supported.
| |||||||||||
Resolves and returns the name of the form object. | |||||||||||
Writes the opening part of the block '
form ' tag and exposes
the form object name in the javax.servlet.jsp.PageContext. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
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 default attribute name: "command"
The name of the javax.servlet.jsp.PageContext attribute under which the form object name is exposed.
Closes the 'form
' block tag and removes the form object name
from the javax.servlet.jsp.PageContext.
JspException |
---|
Set the value of the 'acceptCharset
' attribute.
May be a runtime expression.
Set the value of the 'action
' attribute.
May be a runtime expression.
Set the value of the 'autocomplete
' attribute.
May be a runtime expression.
Set the name of the form attribute in the model.
May be a runtime expression.
Unsupported for forms.
UnsupportedOperationException | always |
---|
Set the value of the 'enctype
' attribute.
May be a runtime expression.
Set the value of the 'method
' attribute.
May be a runtime expression.
Set the name of the request param for non-browser supported HTTP methods.
Set the name of the form attribute in the model.
May be a runtime expression.
Set the value of the 'name
' attribute.
May be a runtime expression.
Name is not a valid attribute for form on XHTML 1.0. However, it is sometimes needed for backward compatibility.
Set the value of the 'onreset
' attribute.
May be a runtime expression.
Set the value of the 'onsubmit
' attribute.
May be a runtime expression.
Unsupported for forms.
UnsupportedOperationException | always |
---|
Set the value of the 'target
' attribute.
May be a runtime expression.
Autogenerated IDs correspond to the form object name.
JspException |
---|
Get the name of the request param for non-browser supported HTTP methods.
Get the value of the 'name
' attribute.
name
' attribute
JspException |
---|
Determine if the HTTP method is supported by browsers (i.e. GET or POST).
Resolve the value of the 'action
' attribute.
If the user configured an 'action
' value then
the result of evaluating this value is used. Otherwise, the
originating URI
is used.
action
' attribute
JspException |
---|
Override resolve CSS class since error class is not supported.
JspException |
---|
Resolves
and returns the name of the form object.
IllegalArgumentException | if the form object resolves to null
|
---|---|
JspException |
Writes the opening part of the block 'form
' tag and exposes
the form object name in the javax.servlet.jsp.PageContext.
tagWriter | the TagWriter to which the form content is to be written |
---|
JspException |
---|