@TagLib class ApplicationTagLib extends java.lang.Object implements ApplicationContextAware, GrailsApplicationAware, InitializingBean, TagLibrary
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 |
---|---|
static java.lang.Object |
LINK_WRITERS |
static java.lang.Object |
SCOPES |
static java.lang.Object |
SUPPORTED_TYPES |
ApplicationContext |
applicationContext |
groovy.lang.Closure |
applyCodec |
groovy.lang.Closure |
cookie Obtains the value of a cookie. |
groovy.lang.Closure |
createLink Creates a grails application link from a set of attributes. |
groovy.lang.Closure |
createLinkTo Creates a link to a resource, generally used as a method rather than a tag. |
groovy.lang.Closure |
external Render the appropriate kind of external link for use in based on the type of the URI. |
GrailsApplication |
grailsApplication |
UrlMappingsHolder |
grailsUrlMappingsHolder |
boolean |
hasResourceProcessor |
groovy.lang.Closure |
header Renders the specified request header value. |
groovy.lang.Closure |
img Render an img tag with src set to a static resource
|
groovy.lang.Closure |
join Uses the Groovy JDK join method to concatenate the toString() representation of each item in this collection with the given separator. |
groovy.lang.Closure |
link General linking to controllers, actions etc. |
LinkGenerator |
linkGenerator |
groovy.lang.Closure |
meta Output application metadata that is loaded from application.yml and grails.build.info if it is present. |
GrailsPluginManager |
pluginManager |
RequestDataValueProcessor |
requestDataValueProcessor |
groovy.lang.Closure |
resource Creates a link to a resource, generally used as a method rather than a tag. |
static java.lang.Object |
returnObjectForTags |
groovy.lang.Closure |
set Sets a variable in the pageContext or the specified scope. |
boolean |
useJsessionId |
groovy.lang.Closure |
withTag Helper method for creating tags called like: withTag(name:'script',attrs:[type:'text/javascript']) { ... }
|
Constructor and description |
---|
ApplicationTagLib
() |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
afterPropertiesSet() |
|
static java.lang.String |
attrsToString(java.util.Map attrs) |
|
protected java.lang.String |
doCreateLink(java.util.Map attrs) |
|
static java.lang.Object |
getAttributesToRender(java.lang.Object constants, java.lang.Object attrs) |
|
java.lang.String |
processedUrl(java.lang.String link, java.lang.Object request) Filters the url through the RequestDataValueProcessor bean if it is registered. |
|
protected java.lang.Object |
renderResourceLink(java.lang.Object attrs)
|
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() |
Obtains the value of a cookie.
Creates a grails application link from a set of attributes. This
link can then be included in links, ajax calls etc. Generally used as a method call
rather than a tag eg.
<a href="${createLink(action:'list')}">List</a>
Creates a link to a resource, generally used as a method rather than a tag.
eg. <link type="text/css" href="${createLinkTo(dir:'css',file:'main.css')}" />
@emptyTag
Render the appropriate kind of external link for use in
based on the type of the URI. For JS will render