org.apache.struts.validator

Class DynaValidatorActionForm

Implemented Interfaces:
DynaBean, Serializable

public class DynaValidatorActionForm
extends DynaValidatorForm
implements DynaBean, Serializable

This class extends DynaValidatorForm 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.

Version:
$Revision: 1.8 $ $Date: 2003/03/05 02:53:15 $

Author:
David Winterfeldt

Since:
Struts 1.1

Field Summary

private static Log
log
Commons Logging instance.

Fields inherited from class org.apache.struts.validator.DynaValidatorForm

log, page, validatorResults

Fields inherited from class org.apache.struts.action.DynaActionForm

dynaClass, dynaValues

Fields inherited from class org.apache.struts.action.ActionForm

multipartRequestHandler, servlet

Method Summary

ActionErrors
validate(ActionMapping mapping, 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.DynaValidatorForm

getPage, getResultValueMap, getValidatorResults, log, log, reset, setPage, setValidatorResults, validate

Methods inherited from class org.apache.struts.action.DynaActionForm

contains, get, get, get, getDynaClass, getDynaProperty, getMap, initialize, isDynaAssignable, remove, reset, reset, set, set, set, setDynaActionFormClass, toString

Methods inherited from class org.apache.struts.action.ActionForm

getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate

Field Details

log

private static Log log
Commons Logging instance.

Method Details

validate

public ActionErrors validate(ActionMapping mapping,
                             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 interface DynaValidatorForm

Parameters:
mapping - The mapping used to select this instance.
request - The servlet request we are processing.

Returns:
ActionErrors containing validation errors.


Copyright B) 2000-2005 - Apache Software Foundation