Groovy Documentation

org.codehaus.groovy.grails.plugins.web.taglib
[Groovy] Class RenderTagLib

java.lang.Object
  org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib
All Implemented Interfaces:
RequestConstants

class RenderTagLib

Tags to help rendering of views and layouts.

Authors:
Graeme Rocher


Property Summary
static java.util.Map TEMPLATE_CACHE

java.lang.Object applyLayout

Apply a layout to a particular block of text or to the given view or template.

java.util.Map controllerToScaffoldedDomainClassMap

GroovyPagesTemplateEngine groovyPagesTemplateEngine

java.lang.Object ifPageProperty

Invokes the body of this tag if the page property exists:

java.lang.Object include

Includes another controller/action within the current response.

java.lang.Object layoutBody

Used in layouts to render the body of a SiteMesh layout.

java.lang.Object layoutHead

Used in layouts to render the head of a SiteMesh layout.

java.lang.Object layoutTitle

Used in layouts to render the page title from the SiteMesh page.

java.lang.Object out

java.lang.Object pageProperty

Used to retrieve a property of the decorated page.

java.lang.Object paginate

Creates next/previous links to support pagination for the current controller.

GrailsPluginManager pluginManager

java.lang.Object render

Renders a template inside views for collections, models and beans.

java.util.Map scaffoldedActionMap

GrailsTemplateGenerator scaffoldingTemplateGenerator

ServletConfig servletConfig

java.lang.Object sortableColumn

Renders a sortable column to support sorting in list views.

 
Method Summary
protected java.lang.Object getPage()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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()
 

Property Detail

TEMPLATE_CACHE

static java.util.Map TEMPLATE_CACHE


applyLayout

java.lang.Object applyLayout
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" />
attr:
name The name of the layout
attr:
template Optional. The template to apply the layout to
attr:
url Optional. The URL to retrieve the content from and apply a layout to
attr:
contentType Optional. The content type to use, default is "text/html"
attr:
encoding Optional. The encoding to use
attr:
params Optiona. The params to pass onto the page object


controllerToScaffoldedDomainClassMap

java.util.Map controllerToScaffoldedDomainClassMap


groovyPagesTemplateEngine

GroovyPagesTemplateEngine groovyPagesTemplateEngine


ifPageProperty

java.lang.Object ifPageProperty
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>
attr:
name REQUIRED the property name
attr:
equals optional value to test against


include

java.lang.Object include
Includes another controller/action within the current response.
<g:include controller="foo" action="test"></g:include>
attr:
controller The name of the controller
attr:
action The name of the action
attr:
id The identifier
attr:
params Any parameters
attr:
view The name of the view. Cannot be specified in combination with controller/action/id
attr:
model A model to pass onto the included controller in the request


layoutBody

java.lang.Object layoutBody
Used in layouts to render the body of a SiteMesh layout.
<g:layoutBody />


layoutHead

java.lang.Object layoutHead
Used in layouts to render the head of a SiteMesh layout.
<g:layoutHead />


layoutTitle

java.lang.Object layoutTitle
Used in layouts to render the page title from the SiteMesh page.
<g:layoutTitle default="The Default title" />
attr:
default the value to use if the title isn't specified in the GSP


out

java.lang.Object out


pageProperty

java.lang.Object pageProperty
Used to retrieve a property of the decorated page.
<g:pageProperty default="defaultValue" name="body.onload" />
attr:
REQUIRED name the property name
attr:
default the default value to use if the property is null
attr:
writeEntireProperty if true, writes the property in the form 'foo = "bar"', otherwise renders 'bar'


paginate

java.lang.Object paginate
Creates next/previous links to support pagination for the current controller.
<g:paginate total="${Account.count()}" />
attr:
total REQUIRED The total number of results to paginate
attr:
action the name of the action to use in the link, if not specified the default action will be linked
attr:
controller the name of the controller to use in the link, if not specified the current controller will be linked
attr:
id The id to use in the link
attr:
params A map containing request parameters
attr:
prev The text to display for the previous link (defaults to "Previous" as defined by default.paginate.prev property in I18n messages.properties)
attr:
next The text to display for the next link (defaults to "Next" as defined by default.paginate.next property in I18n messages.properties)
attr:
max The number of records displayed per page (defaults to 10). Used ONLY if params.max is empty
attr:
maxsteps The number of steps displayed for pagination (defaults to 10). Used ONLY if params.maxsteps is empty
attr:
offset Used only if params.offset is empty
attr:
fragment The link fragment (often called anchor tag) to use


pluginManager

GrailsPluginManager pluginManager


render

java.lang.Object render
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}" />
attr:
template REQUIRED The name of the template to apply
attr:
contextPath the context path to use (relative to the application context path). Defaults to "" or path to the plugin for a plugin view or template.
attr:
bean The bean to apply the template against
attr:
model The model to apply the template against as a java.util.Map
attr:
collection A collection of model objects to apply the template to
attr:
var The variable name of the bean to be referenced in the template
attr:
plugin The plugin to look for the template in


scaffoldedActionMap

java.util.Map scaffoldedActionMap


scaffoldingTemplateGenerator

GrailsTemplateGenerator scaffoldingTemplateGenerator


servletConfig

ServletConfig servletConfig


sortableColumn

java.lang.Object sortableColumn
Renders a sortable column to support sorting in list views.
Attribute title or titleKey is required. When both attributes are specified then titleKey takes precedence, resulting in the title caption to be resolved against the message source. In case when the message could not be resolved, the title will be used as title caption.
Examples:
<g:sortableColumn property="title" title="Title" />
<g:sortableColumn property="title" title="Title" style="width: 200px" />
<g:sortableColumn property="title" titleKey="book.title" />
<g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" />
<g:sortableColumn property="releaseDate" defaultOrder="desc" title="Release Date" titleKey="book.releaseDate" />
attr:
property - name of the property relating to the field
attr:
defaultOrder default order for the property; choose between asc (default if not provided) and desc
attr:
title title caption for the column
attr:
titleKey title key to use for the column, resolved against the message source
attr:
params a map containing request parameters
attr:
action the name of the action to use in the link, if not specified the list action will be linked
attr:
params A map containing URL query parameters
attr:
class CSS class name


 
Method Detail

getPage

protected java.lang.Object getPage()


 

Groovy Documentation