@groovy.transform.CompileStatic @TagLib class RenderTagLib extends java.lang.Object implements GrailsApplicationAware, RequestConstants, TagLibrary
Tags to help rendering of views and layouts.
Modifiers | Name | Description |
---|---|---|
protected boolean |
sitemeshPreprocessMode |
Type | Name and description |
---|---|
groovy.lang.Closure |
applyLayout Apply a layout to a particular block of text or to the given view or template. |
CodecLookup |
codecLookup |
ErrorsViewStackTracePrinter |
errorsViewStackTracePrinter |
GroovyPageLayoutFinder |
groovyPageLayoutFinder |
GroovyPagesTemplateEngine |
groovyPagesTemplateEngine |
GroovyPagesTemplateRenderer |
groovyPagesTemplateRenderer |
TagLibraryLookup |
gspTagLibraryLookup |
groovy.lang.Closure |
ifPageProperty Invokes the body of this tag if the page property exists: |
groovy.lang.Closure |
layoutBody Used in layouts to render the body of a SiteMesh layout. |
groovy.lang.Closure |
layoutHead Used in layouts to render the head of a SiteMesh layout. |
groovy.lang.Closure |
layoutTitle Used in layouts to render the page title from the SiteMesh page. |
groovy.lang.Closure |
pageProperty Used to retrieve a property of the decorated page. |
groovy.lang.Closure |
render Renders a template inside views for collections, models and beans. |
groovy.lang.Closure |
renderException Renders an exception for the errors view |
Constructor and description |
---|
RenderTagLib
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected PageParser |
createPageParser(java.lang.String contentType) |
|
protected Decorator |
findDecorator(HttpServletRequest req, java.lang.String layoutName) |
|
protected groovy.text.Template |
findTemplate(Decorator decorator) |
|
protected HTMLPage |
getPage() |
|
protected groovy.util.Factory |
getSitemeshFactory() |
|
protected boolean |
isSitemeshPreprocessMode() |
|
void |
setGrailsApplication(GrailsApplication grailsApplication) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
Apply a layout to a particular block of text or to the given view or template.
<g:applyLayout name="myLayout">some text</g:applyLayout>
<g:applyLayout name="myLayout" template="mytemplate" />
<g:applyLayout name="myLayout" url="http://www.google.com" />
<g:applyLayout name="myLayout" action="myAction" controller="myController">
Invokes the body of this tag if the page property exists:
<g:ifPageProperty name="meta.index">body to invoke</g:ifPageProperty>
or it equals a certain value:
<g:ifPageProperty name="meta.index" equals="blah">body to invoke</g:ifPageProperty>
Used in layouts to render the body of a SiteMesh layout.
<g:layoutBody />
@emptyTag
Used in layouts to render the head of a SiteMesh layout.
<g:layoutHead />
@emptyTag
Used in layouts to render the page title from the SiteMesh page.
<g:layoutTitle default="The Default title" />
Used to retrieve a property of the decorated page.
<g:pageProperty default="defaultValue" name="body.onload" />
Renders a template inside views for collections, models and beans. Examples:
<g:render template="atemplate" collection="${users}" />
<g:render template="atemplate" model="[user:user,company:company]" />
<g:render template="atemplate" bean="${user}" />
Renders an exception for the errors view
Groovy Documentation