org.apache.struts.validator
Class ValidatorActionForm

java.lang.Object
  |
  +--org.apache.struts.action.ActionForm
        |
        +--org.apache.struts.validator.ValidatorForm
              |
              +--org.apache.struts.validator.ValidatorActionForm
All Implemented Interfaces:
java.io.Serializable

public class ValidatorActionForm
extends ValidatorForm
implements java.io.Serializable

This class extends ValidatorForm and provides basic field validation based on an XML file. The key passed into the validator is the action element's 'path' attribute from the struts-config.xml which should match the form element's name attribute in the validation.xml.

Since:
Struts 1.1
Version:
$Revision: 1.1 $ $Date$
Author:
David Winterfeldt
See Also:
Serialized Form

Field Summary
private static org.apache.commons.logging.Log log
          Commons Logging instance.
 
Fields inherited from class org.apache.struts.validator.ValidatorForm
page, validatorResults
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
ValidatorActionForm()
           
 
Method Summary
 ActionErrors validate(ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
          Validate the properties that have been set from this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found.
 
Methods inherited from class org.apache.struts.validator.ValidatorForm
getPage, getResultValueMap, getValidatorResults, log, log, reset, setPage, setValidatorResults
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, setMultipartRequestHandler, setServlet, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Commons Logging instance.

Constructor Detail

ValidatorActionForm

public ValidatorActionForm()
Method Detail

validate

public ActionErrors validate(ActionMapping mapping,
                             javax.servlet.http.HttpServletRequest request)
Validate the properties that have been set from this HTTP request, and return an ActionErrors object that encapsulates any validation errors that have been found. If no errors are found, return null or an ActionErrors object with no recorded error messages.

Overrides:
validate in class ValidatorForm
Parameters:
mapping - The mapping used to select this instance
request - The servlet request we are processing
Returns:
ActionErrors object that encapsulates any validation errors


Copyright © 2000-2003 - Apache Software Foundation