org.apache.struts2.s1
Class ActionFormValidationInterceptor

java.lang.Object
  extended by com.opensymphony.xwork2.interceptor.AbstractInterceptor
      extended by org.apache.struts2.s1.ActionFormValidationInterceptor
All Implemented Interfaces:
com.opensymphony.xwork2.interceptor.Interceptor, Serializable

public class ActionFormValidationInterceptor
extends com.opensymphony.xwork2.interceptor.AbstractInterceptor

Calls the validate() method on the ActionForm, if it exists. The errors are handled like regular XWork validation errors. Action-level validation flag supported if the action is a subclass of Struts1Action.

See Also:
Serialized Form

Field Summary
protected  com.opensymphony.xwork2.config.Configuration configuration
           
 
Constructor Summary
ActionFormValidationInterceptor()
           
 
Method Summary
 String getPathnames()
           
 String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
           
 boolean isStopOnFirstError()
           
protected  org.apache.commons.validator.ValidatorResources loadResources(javax.servlet.ServletContext ctx)
          Initialize the validator resources for this module.
 void setConfiguration(com.opensymphony.xwork2.config.Configuration config)
           
 void setPathnames(String pathNames)
           
 void setStopOnFirstError(boolean stopOnFirstError)
           
 
Methods inherited from class com.opensymphony.xwork2.interceptor.AbstractInterceptor
destroy, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configuration

protected com.opensymphony.xwork2.config.Configuration configuration
Constructor Detail

ActionFormValidationInterceptor

public ActionFormValidationInterceptor()
Method Detail

setConfiguration

public void setConfiguration(com.opensymphony.xwork2.config.Configuration config)

intercept

public String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                 throws Exception
Specified by:
intercept in interface com.opensymphony.xwork2.interceptor.Interceptor
Specified by:
intercept in class com.opensymphony.xwork2.interceptor.AbstractInterceptor
Throws:
Exception

loadResources

protected org.apache.commons.validator.ValidatorResources loadResources(javax.servlet.ServletContext ctx)
                                                                 throws IOException,
                                                                        javax.servlet.ServletException
Initialize the validator resources for this module.

Throws:
IOException - if an input/output error is encountered
javax.servlet.ServletException - if we cannot initialize these resources

getPathnames

public String getPathnames()
Returns:
the pathnames

setPathnames

public void setPathnames(String pathNames)
Parameters:
pathNames - the pathnames to set

isStopOnFirstError

public boolean isStopOnFirstError()
Returns:
the stopOnFirstError

setStopOnFirstError

public void setStopOnFirstError(boolean stopOnFirstError)
Parameters:
stopOnFirstError - the stopOnFirstError to set


Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.