@grails.gsp.TagLib class FormatTagLib extends java.lang.Object
The base application tag library for Grails many of which take inspiration from Rails helpers (thanks guys! :) This tag library tends to get extended by others as tags within here can be re-used in said libraries.
| Type | Name and description |
|---|---|
org.grails.encoder.CodecLookup |
codecLookup |
groovy.lang.Closure |
encodeAsEncodes the body using the specified codec. |
groovy.lang.Closure |
formatBooleanOutputs the given boolean as the specified text label. |
groovy.lang.Closure |
formatDateOutputs the given Date object in the specified format. |
groovy.lang.Closure |
formatNumberOutputs the given number in the specified format. |
org.springframework.context.MessageSource |
messageSource |
static java.lang.Object |
returnObjectForTags |
| Type | Name and description |
|---|---|
java.lang.String |
messageHelper(java.lang.String code, java.lang.Object defaultMessage = null, java.util.List args = null, java.util.Locale locale = null) |
java.lang.Object |
parseStyle(java.lang.Object styleStr) |
static java.util.Locale |
resolveLocale(java.lang.Object localeAttr) |
| 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() |
Encodes the body using the specified codec.
Outputs the given boolean as the specified text label. If the
true and false option are not given,
then the boolean is output using the default label.
Examples:
<g:formatBoolean boolean="${myBoolean}" />
<g:formatBoolean boolean="${myBoolean}" true="True!" false="False!" />
Outputs the given Date object in the specified format. If
the date is not given, then the current date/time is used.
If the format option is not given, then the date is output
using the default format.
e.g., <g:formatDate date="${myDate}" format="yyyy-MM-dd HH:mm" />
Outputs the given number in the specified format. If the
format option is not given, then the number is output
using the default format.
e.g., <g:formatNumber number="${myNumber}" format="###,##0" />