class PageRenderer extends java.lang.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 |
java.util.Locale |
locale |
ServletContext |
servletContext |
Constructor and description |
---|
PageRenderer
(GroovyPagesTemplateEngine templateEngine) |
Type Params | Return Type | Name and description |
---|---|---|
|
protected GroovyPageScriptSource |
findResource(java.lang.String basePath) |
|
java.lang.String |
render(java.util.Map args) Renders a page and returns the contents |
|
void |
renderTo(java.util.Map args, java.io.Writer writer) Renders a page and returns the contents |
|
void |
renderTo(java.util.Map args, java.io.OutputStream stream) Renders a page and returns the contents |
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() |
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 streamGroovy Documentation