@TagLib class FormTagLib extends java.lang.Object
Tags for working with form controls.
Type | Name and description |
---|---|
groovy.lang.Closure |
actionSubmit Creates a submit button that submits to an action in the controller specified by the form action. |
groovy.lang.Closure |
actionSubmitImage Creates a an image submit button that submits to an action in the controller specified by the form action. |
org.springframework.context.ApplicationContext |
applicationContext |
groovy.lang.Closure |
checkBox A helper tag for creating checkboxes. |
CodecLookup |
codecLookup |
org.springframework.core.convert.ConversionService |
conversionService |
groovy.lang.Closure |
currencySelect A helper tag for creating currency selects. |
groovy.lang.Closure |
datePicker A simple date picker that renders a date as selects. |
groovy.lang.Closure |
field A general tag for creating fields. |
groovy.lang.Closure |
form General linking to controllers, actions etc. |
GrailsTagDateHelper |
grailsTagDateHelper |
groovy.lang.Closure |
hiddenField Creates a hidden field. |
groovy.lang.Closure |
localeSelect A helper tag for creating locale selects. |
groovy.lang.Closure |
passwordField Creates a new password field. |
groovy.lang.Closure |
radio A helper tag for creating radio buttons. |
groovy.lang.Closure |
radioGroup A helper tag for creating radio button groups. |
groovy.lang.Closure |
renderNoSelectionOption |
org.springframework.web.servlet.support.RequestDataValueProcessor |
requestDataValueProcessor |
groovy.lang.Closure |
select A helper tag for creating HTML selects. |
groovy.lang.Closure |
submitButton Creates a submit button. |
groovy.lang.Closure |
textArea A general tag for creating textareas. |
groovy.lang.Closure |
textField Creates a new text field. |
groovy.lang.Closure |
timeZoneSelect A helper tag for creating TimeZone selects. |
groovy.lang.Closure |
uploadForm Same as <g:form>, except sets the relevant enctype for a file upload form. |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
afterPropertiesSet() |
|
java.lang.Object |
fieldImpl(GrailsPrintWriter out, java.util.Map attrs) |
|
java.lang.Object |
hiddenFieldImpl(java.lang.Object out, java.lang.Object attrs) |
|
void |
outputAttributes(java.util.Map attrs, GrailsPrintWriter writer, boolean useNameAsIdIfIdDoesNotExist = false) Dump out attributes in HTML compliant fashion. |
|
java.lang.String |
processedUrl(java.lang.String link, java.lang.Object request) Filters the url through the RequestDataValueProcessor bean if it is registered. |
|
java.lang.Object |
renderNoSelectionOptionImpl(java.lang.Object out, java.lang.Object noSelectionKey, java.lang.Object noSelectionValue, java.lang.Object value) |
|
void |
resolveAttributes(java.util.Map attrs) Check required attributes, set the id to name if no id supplied, extract bean values etc. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Creates a submit button that submits to an action in the controller specified by the form action.
The name of the action attribute is translated into the action name, for example "Edit" becomes
"_action_edit" or "List People" becomes "_action_listPeople".
If the action attribute is not specified, the value attribute will be used as part of the action name.
<g:actionSubmit value="Edit" />
<g:actionSubmit action="Edit" value="Some label for editing" />
Creates a an image submit button that submits to an action in the controller specified by the form action.
The name of the action attribute is translated into the action name, for example "Edit" becomes
"_action_edit" or "List People" becomes "_action_listPeople".
If the action attribute is not specified, the value attribute will be used as part of the action name.
<g:actionSubmitImage src="/images/submitButton.gif" action="Edit" />
A helper tag for creating checkboxes.
A helper tag for creating currency selects.
eg. <g:currencySelect name="myCurrency" value="${currency}" />
A simple date picker that renders a date as selects.
e.g. <g:datePicker name="myDate" value="${new Date()}" />
A general tag for creating fields.
General linking to controllers, actions etc. Examples:
<g:form action="myaction">...</g:form>
<g:form controller="myctrl" action="myaction">...</g:form>
Creates a hidden field.
A helper tag for creating locale selects.
eg. <g:localeSelect name="myLocale" value="${locale}" />
Creates a new password field.
A helper tag for creating radio buttons.
A helper tag for creating radio button groups.
A helper tag for creating HTML selects.
Examples:
<g:select name="user.age" from="${18..65}" value="${age}" />
<g:select name="user.company.id" from="${Company.list()}" value="${user?.company.id}" optionKey="id" />
from
, a Closure that accepts an item from from
and returns the value or a List that contains a value for each of the <option>s.Creates a submit button.
A general tag for creating textareas.
Creates a new text field.
A helper tag for creating TimeZone selects.
eg. <g:timeZoneSelect name="myTimeZone" value="${tz}" />
Same as <g:form>, except sets the relevant enctype for a file upload form.
Dump out attributes in HTML compliant fashion.
Filters the url through the RequestDataValueProcessor bean if it is registered.
Check required attributes, set the id to name if no id supplied, extract bean values etc.