Package org.apache.struts.validator
Class ValidatorPlugIn
java.lang.Object
org.apache.struts.validator.ValidatorPlugIn
- All Implemented Interfaces:
PlugIn
Loads
ValidatorResources based on configuration in the
struts-config.xml file.- Since:
- Struts 1.1
- Version:
- $Rev$ $Date: 2005-08-30 00:22:27 -0400 (Tue, 30 Aug 2005) $
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.commons.validator.ValidatorResourcesThe set of Form instances that have been created and initialized, keyed by the struts form name.static final StringApplication scope key thatStopOnErroris stored under.static final StringApplication scope key thatValidatorResourcesis stored under. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Gracefully shut down, releasing any resources that were allocated at initialization.protected voidDestroyValidatorResources.Gets a comma delimitted list of Validator resources.voidinit(ActionServlet servlet, ModuleConfig config) Initialize and load our resources.protected voidInitialize the validator resources for this module.booleanGets the value for stopOnFirstError.voidsetPathnames(String pathnames) Sets a comma delimitted list of Validator resources.voidsetStopOnFirstError(boolean stopOnFirstError) Sets the value for stopOnFirstError.
-
Field Details
-
VALIDATOR_KEY
Application scope key thatValidatorResourcesis stored under.- See Also:
-
STOP_ON_ERROR_KEY
Application scope key thatStopOnErroris stored under.- Since:
- Struts 1.2
- See Also:
-
resources
protected org.apache.commons.validator.ValidatorResources resourcesThe set of Form instances that have been created and initialized, keyed by the struts form name.
-
-
Constructor Details
-
ValidatorPlugIn
public ValidatorPlugIn()
-
-
Method Details
-
getPathnames
Gets a comma delimitted list of Validator resources.- Returns:
- comma delimited list of Validator resource path names
-
setPathnames
Sets a comma delimitted list of Validator resources.- Parameters:
pathnames- delimited list of Validator resource path names
-
isStopOnFirstError
public boolean isStopOnFirstError()Gets the value for stopOnFirstError.- Returns:
- A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.
- Since:
- Struts 1.2
-
setStopOnFirstError
public void setStopOnFirstError(boolean stopOnFirstError) Sets the value for stopOnFirstError.- Parameters:
stopOnFirstError- A boolean indicating whether JavaScript validation should stop when it finds the first error (Struts 1.1 behaviour) or continue validation.- Since:
- Struts 1.2
-
init
Initialize and load our resources.- Specified by:
initin interfacePlugIn- Parameters:
servlet- The ActionServlet for our applicationconfig- The ModuleConfig for our owning module- Throws:
ServletException- if we cannot configure ourselves correctly
-
destroy
public void destroy()Gracefully shut down, releasing any resources that were allocated at initialization. -
initResources
Initialize the validator resources for this module.- Throws:
IOException- if an input/output error is encounteredServletException- if we cannot initialize these resources
-
destroyResources
protected void destroyResources()DestroyValidatorResources.
-