|
Groovy Documentation | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.servlet.view.AbstractUrlBasedView org.codehaus.groovy.grails.web.servlet.view.GroovyPageView
public class GroovyPageView extends AbstractUrlBasedView
A Spring View that renders Groovy Server Pages to the reponse. It requires an instance of GroovyPagesTemplateEngine to be set and will render to view returned by the getUrl() method of AbstractUrlBasedView This view also requires an instance of GrailsWebRequest to be bound to the currently executing Thread using Spring's RequestContextHolder. This can be done with by adding the GrailsWebRequestFilter.
Field Summary | |
---|---|
static java.lang.String |
EXCEPTION_MODEL_KEY
|
Method Summary | |
---|---|
protected java.io.Writer
|
createResponseWriter(HttpServletResponse response)
Creates the Response Writer for the specified HttpServletResponse instance. |
protected void
|
handleException(java.lang.Exception exception, java.io.Writer out, GroovyPagesTemplateEngine engine, HttpServletRequest request, HttpServletResponse response)
Performs exception handling by attempting to render the Errors view. |
boolean
|
isExpired()
|
protected void
|
renderMergedOutputModel(java.util.Map model, HttpServletRequest request, HttpServletResponse response)
Delegates to renderMergedOutputModel(..) |
protected void
|
renderWithTemplateEngine(GroovyPagesTemplateEngine engine, java.util.Map model, HttpServletResponse response, HttpServletRequest request)
Replaces the requirement for "super.exposeModelAsRequestAttributes(model, request);" in renderMergedOutputModel. |
void
|
setTemplateEngine(GroovyPagesTemplateEngine templateEngine)
|
Field Detail |
---|
public static final java.lang.String EXCEPTION_MODEL_KEY
Method Detail |
---|
protected java.io.Writer createResponseWriter(HttpServletResponse response)
response
- The HttpServletResponse instance
protected void handleException(java.lang.Exception exception, @SuppressWarnings("unused") java.io.Writer out, @SuppressWarnings("unused") GroovyPagesTemplateEngine engine, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response)
exception
- The exception that occuredout
- The Writerengine
- The GSP engine
public boolean isExpired()
@SuppressWarnings({ "unchecked", "rawtypes" }) @Override protected final void renderMergedOutputModel(java.util.Map model, HttpServletRequest request, HttpServletResponse response)
model
- The view modelrequest
- The HttpServletRequestresponse
- The HttpServletResponse
@SuppressWarnings("rawtypes") protected void renderWithTemplateEngine(GroovyPagesTemplateEngine engine, java.util.Map model, HttpServletResponse response, HttpServletRequest request)
public void setTemplateEngine(GroovyPagesTemplateEngine templateEngine)
Groovy Documentation