@grails.gsp.TagLib class FormTagLib extends java.lang.Object
Tags for working with form controls.
| Type | Name and description |
|---|---|
groovy.lang.Closure |
actionSubmitCreates a submit button that submits to an action in the controller specified by the form action. |
groovy.lang.Closure |
actionSubmitImageCreates 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 |
checkBoxA helper tag for creating checkboxes. |
org.grails.encoder.CodecLookup |
codecLookup |
org.springframework.core.convert.ConversionService |
conversionService |
groovy.lang.Closure |
currencySelectA helper tag for creating currency selects. |
groovy.lang.Closure |
datePickerA simple date picker that renders a date as selects. |
groovy.lang.Closure |
fieldA general tag for creating fields. |
groovy.lang.Closure |
formGeneral linking to controllers, actions etc. |
groovy.lang.Closure |
hiddenFieldCreates a hidden field. |
groovy.lang.Closure |
localeSelectA helper tag for creating locale selects. |
groovy.lang.Closure |
passwordFieldCreates a new password field. |
groovy.lang.Closure |
radioA helper tag for creating radio buttons. |
groovy.lang.Closure |
radioGroupA helper tag for creating radio button groups. |
groovy.lang.Closure |
renderNoSelectionOption |
org.springframework.web.servlet.support.RequestDataValueProcessor |
requestDataValueProcessor |
groovy.lang.Closure |
selectA helper tag for creating HTML selects. |
groovy.lang.Closure |
submitButtonCreates a submit button. |
groovy.lang.Closure |
textAreaA general tag for creating textareas. |
groovy.lang.Closure |
textFieldCreates a new text field. |
groovy.lang.Closure |
timeZoneSelectA helper tag for creating TimeZone selects. |
groovy.lang.Closure |
uploadFormSame as <g:form>, except sets the relevant enctype for a file upload form. |
| Type | Name and description |
|---|---|
void |
afterPropertiesSet() |
java.lang.Object |
fieldImpl(org.grails.buffer.GrailsPrintWriter out, java.util.Map attrs) |
java.lang.Object |
hiddenFieldImpl(java.lang.Object out, java.lang.Object attrs) |
void |
outputAttributes(java.util.Map attrs, org.grails.buffer.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" />
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.