Description

A multi-purpose method for rendering responses to the client which is best illustrated with a few examples! Warning - this method does not always support multiple parameters. For example, if you specify both collection and model, the model parameter will be ignored.
Parameters

Parameters:

text (optional) - The text to render

builder (optional) - The builder to use when rendering markup

view (optional) - The view to delegate the rendering to

template (optional) - The template to render. A template is usually an HTML snippet and the file starts with an underscore ("_"). This is used mostly in AJAX requests.

layout (optional) - The layout to use for the response

var (optional) - The name of the variable to be passed into a template, defaults to the Groovy default argument 'it' if not specified

bean (optional) - The beanto use in rendering

model (optional) - The model to use in rendering

collection (optional) - For rendering a template against each item in a collection

contentType (optional) - The contentType of the response

encoding (optional) - The encoding of the response

converter (as single non-named first parameter) - A Converter that should be rendered as Response

Copies of this document may be made for your own use and for distribution to others, provided that you do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.
Sponsored by SpringSource