com.veriplace.web.spring
Class SpringStatusViewRenderer

java.lang.Object
  extended by com.veriplace.web.views.AbstractStatusViewRenderer
      extended by com.veriplace.web.spring.SpringStatusViewRenderer
All Implemented Interfaces:
StatusViewRenderer

public class SpringStatusViewRenderer
extends AbstractStatusViewRenderer

Implementation of StatusViewRenderer for the Spring MVC framework. The difference between this and ServletStatusViewRenderer is that this uses Spring's ViewResolver rather than the basic request dispatcher forwarding mechanism, and passes the LocationState attributes to the view as a Spring model rather than just as attributes on the HttpServletRequest.

In your application context configuration files, you should define a SpringStatusViewRenderer bean and refer to it in the statusViewRenderer property of your Veriplace instance. You can use all the properties that this class inherits from AbstractStatusViewRenderer to specify the view names for errors or wait conditions.


Field Summary
 
Fields inherited from class com.veriplace.web.views.AbstractStatusViewRenderer
callbackAttributeName, DEFAULT_ERROR_KEY, ERROR_KEY_PREFIX, stateAttributeName, WAITING_KEY
 
Constructor Summary
SpringStatusViewRenderer()
           
 
Method Summary
 ViewResolver getViewResolver()
           
protected  boolean renderViewInternal(HttpServletRequest request, HttpServletResponse response, VeriplaceState state, java.lang.String viewName)
          Override this method to implement displaying a page based on a view name.
 void setViewResolver(ViewResolver viewResolver)
           
 
Methods inherited from class com.veriplace.web.views.AbstractStatusViewRenderer
canRenderWaitingView, getCallbackAttributeName, getDefaultErrorViewName, getErrorViewName, getStateAttributeName, getViewMap, getWaitingViewName, matchExceptionClass, renderErrorView, renderWaitingView, setCallbackAttributeName, setDefaultErrorViewName, setErrorViewName, setStateAttributeName, setViewMap, setWaitingViewName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpringStatusViewRenderer

public SpringStatusViewRenderer()
Method Detail

getViewResolver

public ViewResolver getViewResolver()

setViewResolver

public void setViewResolver(ViewResolver viewResolver)

renderViewInternal

protected boolean renderViewInternal(HttpServletRequest request,
                                     HttpServletResponse response,
                                     VeriplaceState state,
                                     java.lang.String viewName)
                              throws StatusViewException
Description copied from class: AbstractStatusViewRenderer
Override this method to implement displaying a page based on a view name. Standard implementations of this for generic servlets and Spring are provided by ServletStatusViewRenderer and SpringStatusViewRenderer.

Specified by:
renderViewInternal in class AbstractStatusViewRenderer
Parameters:
request - the current HttpServletRequest
response - the current HttpServletResponse
state - the current VeriplaceState
viewName - name of the view to display
Throws:
StatusViewException - for any error that prevents the page from being displayed