class PageRenderer extends Object implements ApplicationContextAware, ServletContextAware
Simplified API for rendering GSP pages from services, jobs and other non-request classes.
| Modifiers | Name | Description |
|---|---|---|
static class |
PageRenderer.PageRenderRequestCreator |
|
static class |
PageRenderer.PageRenderResponseCreator |
| Type | Name and description |
|---|---|
ApplicationContext |
applicationContext |
GrailsConventionGroovyPageLocator |
groovyPageLocator |
Locale |
locale |
ServletContext |
servletContext |
| Constructor and description |
|---|
PageRenderer(GroovyPagesTemplateEngine templateEngine) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected GroovyPageScriptSource |
findResource(String basePath) |
|
String |
render(Map args)Renders a page and returns the contents |
|
void |
renderTo(Map args, Writer writer)Renders a page and returns the contents |
|
void |
renderTo(Map args, OutputStream stream)Renders a page and returns the contents |
Renders a page and returns the contents
args - The named argumentsRenders a page and returns the contents
args - The named argumentswriter - The target writerRenders a page and returns the contents
args - The named argumentsstream - The target stream