@groovy.transform.Trait @groovy.transform.CompileStatic trait ResponseRenderer extends WebAttributes
A trait that adds behavior to allow rendering of objects to the response
Modifiers | Name | Description |
---|---|---|
private java.util.Collection<ActionResultTransformer> |
actionResultTransformers |
|
private org.grails.web.sitemesh.GroovyPageLayoutFinder |
groovyPageLayoutFinder |
|
private MimeUtility |
mimeUtility |
|
private GrailsPluginManager |
pluginManager |
Fields inherited from class | Fields |
---|---|
trait WebAttributes |
grailsApplication |
Type Params | Return Type | Name and description |
---|---|---|
|
private boolean |
applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument) |
|
private boolean |
applyContentType(javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.Object renderArgument, boolean useDefault) |
|
private void |
applySiteMeshLayout(javax.servlet.http.HttpServletRequest request, boolean renderView, java.lang.String explicitSiteMeshLayout) |
|
private boolean |
detectContentTypeFromFileName(GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response, java.util.Map argMap, java.lang.String fileName) |
|
private java.lang.String |
getContextPath(GrailsWebRequest webRequest, java.util.Map argMap) |
|
private GrailsPluginManager |
getPluginManager(GrailsWebRequest webRequest) |
|
private boolean |
handleStatusArgument(java.util.Map argMap, GrailsWebRequest webRequest, javax.servlet.http.HttpServletResponse response) |
|
private boolean |
isJSONResponse(javax.servlet.http.HttpServletResponse response) |
|
void |
render(java.lang.Object object) Render the given object to the response |
|
void |
render(groovy.lang.Closure closure) Use the given closure to render markup to the response. |
|
void |
render(java.util.Map argMap, groovy.lang.Closure closure) Render the given closure, configured by the named argument map, to the response |
|
void |
render(java.util.Map argMap, java.lang.CharSequence body) Render the given CharSequence to the response with the give named arguments |
|
void |
render(java.lang.CharSequence txt) Renders text to the response for the given CharSequence |
|
void |
render(java.util.Map argMap, groovy.lang.Writable writable) Render the given writable to the response using the named arguments to configure the response |
|
void |
render(java.util.Map argMap) Render a response for the given named arguments |
|
private void |
renderJsonInternal(javax.servlet.http.HttpServletResponse response, groovy.lang.Closure callable) |
|
private void |
renderMarkupInternal(GrailsWebRequest webRequest, groovy.lang.Closure closure, javax.servlet.http.HttpServletResponse response) |
|
private void |
renderTemplateForCollection(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding, java.lang.Object colObject, java.lang.String var) |
|
private void |
renderViewForTemplate(GrailsWebRequest webRequest, org.springframework.web.servlet.View view, java.util.Map binding) |
|
private void |
renderWritable(groovy.lang.Writable writable, javax.servlet.http.HttpServletResponse response) |
|
private java.lang.String |
resolveContentTypeBySourceType(java.lang.Object renderArgument, java.lang.String defaultEncoding) |
|
void |
setActionResultTransformers(ActionResultTransformer[] actionResultTransformers) |
|
private void |
setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding) |
|
private void |
setContentType(javax.servlet.http.HttpServletResponse response, java.lang.String contentType, java.lang.String encoding, boolean contentTypeIsDefault) |
|
void |
setGroovyPageLayoutFinder(org.grails.web.sitemesh.GroovyPageLayoutFinder groovyPageLayoutFinder) |
|
void |
setMimeUtility(MimeUtility mimeUtility) |
|
private void |
setTemplateModel(GrailsWebRequest webRequest, java.util.Map binding, java.util.Map modelObject) |
Methods inherited from class | Name |
---|---|
trait WebAttributes |
currentRequestAttributes, getActionName, getControllerClass, getControllerName, getControllerNamespace, getFlash, getGrailsApplication, getGrailsAttributes, getParams, getPluginContextPath, getWebRequest |
Render the given object to the response
object
- The object to renderUse the given closure to render markup to the response. The markup is assumed to be HTML. Use ResponseRenderer.render to change the content type.
closure
- The markup to renderRender the given closure, configured by the named argument map, to the response
argMap
- The name argumentsclosure
- The closure to renderRender the given CharSequence to the response with the give named arguments
argMap
- The named argumentsbody
- The text to renderRenders text to the response for the given CharSequence
txt
- The text to renderRender the given writable to the response using the named arguments to configure the response
argMap
- The named argumentswritable
- The writableRender a response for the given named arguments
argMap
- The named argument map