org.springjutsu.validation.mvc
Class ValidationFailureViewHandlerExceptionResolver

java.lang.Object
  extended by org.springjutsu.validation.mvc.ValidationFailureViewHandlerExceptionResolver
All Implemented Interfaces:
org.springframework.web.servlet.HandlerExceptionResolver

public class ValidationFailureViewHandlerExceptionResolver
extends Object
implements org.springframework.web.servlet.HandlerExceptionResolver

Handles the implementation of the @link{ValidationFailureView} annotation.

Author:
Clark Duplichien

Constructor Summary
ValidationFailureViewHandlerExceptionResolver()
           
 
Method Summary
 org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Object handler, Exception ex)
          When a BindException is caught, purportedly because some validation using the @link{Valid} annotated validation failed, redirect to the view indicated by the @link{ValidationFailureView} annotation of the controller method, and attach any validation errors messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationFailureViewHandlerExceptionResolver

public ValidationFailureViewHandlerExceptionResolver()
Method Detail

resolveException

public org.springframework.web.servlet.ModelAndView resolveException(javax.servlet.http.HttpServletRequest request,
                                                                     javax.servlet.http.HttpServletResponse response,
                                                                     Object handler,
                                                                     Exception ex)
When a BindException is caught, purportedly because some validation using the @link{Valid} annotated validation failed, redirect to the view indicated by the @link{ValidationFailureView} annotation of the controller method, and attach any validation errors messages. In the event that there are multiple possible validation failure paths defined for the validation failure view, will attempt to isolate the closest matching url-path key and redirect to the value path, as described in @link{ValidationFailureView}

Specified by:
resolveException in interface org.springframework.web.servlet.HandlerExceptionResolver


Copyright © 2013 Spring Jutsu. All Rights Reserved.