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, java.io.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
 java.lang.String getPathnames()
           
 java.lang.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(java.lang.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 java.lang.String intercept(com.opensymphony.xwork2.ActionInvocation invocation)
                           throws java.lang.Exception
Specified by:
intercept in interface com.opensymphony.xwork2.interceptor.Interceptor
Specified by:
intercept in class com.opensymphony.xwork2.interceptor.AbstractInterceptor
Throws:
java.lang.Exception

loadResources

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

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

getPathnames

public java.lang.String getPathnames()
Returns:
the pathnames

setPathnames

public void setPathnames(java.lang.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-2009 Apache Software Foundation. All Rights Reserved.