|
|||||||||
| Home >> All >> org >> apache >> struts >> [ validator overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.struts.validator
Class DynaValidatorForm

java.lang.Objectorg.apache.struts.action.ActionForm
org.apache.struts.action.DynaActionForm
org.apache.struts.validator.DynaValidatorForm
- All Implemented Interfaces:
- org.apache.commons.beanutils.DynaBean, java.io.Serializable
- Direct Known Subclasses:
- DynaValidatorActionForm
- public class DynaValidatorForm
- extends org.apache.struts.action.DynaActionForm
- implements org.apache.commons.beanutils.DynaBean, java.io.Serializable
- extends org.apache.struts.action.DynaActionForm
This class extends DynaActionForm and provides basic field validation based on an XML file. The key passed into the validator is the action element's 'name' attribute from the struts-config.xml which should match the form element's name attribute in the validation.xml.
- See
ValidatorPlugindefinition in struts-config.xml for validation rules.
- Since:
- Struts 1.1
- Version:
- $Rev: 164862 $ $Date: 2005-04-26 20:08:32 +0100 (Tue, 26 Apr 2005) $
| Field Summary | |
private static org.apache.commons.logging.Log |
log
Commons Logging instance. |
protected int |
page
Used to indicate the current page of a multi-page form. |
protected org.apache.commons.validator.ValidatorResults |
validatorResults
The results returned from the validation performed by the Validator. |
| Fields inherited from class org.apache.struts.action.DynaActionForm |
dynaClass, dynaValues |
| Fields inherited from class org.apache.struts.action.ActionForm |
multipartRequestHandler, servlet |
| Constructor Summary | |
DynaValidatorForm()
|
|
| Method Summary | |
int |
getPage()
Gets page. |
java.util.Map |
getResultValueMap()
Returns a Map of values returned
from any validation that returns a value other than
null or Boolean with the
key the full property path of the field. |
java.lang.String |
getValidationKey(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Returns the Validation key. |
org.apache.commons.validator.ValidatorResults |
getValidatorResults()
Get results of the validation performed by the Validator. |
void |
reset(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Reset all properties to their default values. |
void |
setPage(int page)
Sets page. |
protected void |
setPageFromDynaProperty()
Sets this.page to the value of the Dyna property "page" if it's defined. |
void |
setValidatorResults(org.apache.commons.validator.ValidatorResults validatorResults)
Set results of the validation performed by the Validator. |
org.apache.struts.action.ActionErrors |
validate(org.apache.struts.action.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.action.DynaActionForm |
contains, get, get, get, getDynaClass, getDynaProperty, getMap, getString, getStrings, initialize, initialize, isDynaAssignable, remove, reset, set, set, set, toString |
| Methods inherited from class org.apache.struts.action.ActionForm |
getMultipartRequestHandler, getServlet, getServletWrapper, setMultipartRequestHandler, setServlet, validate |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.commons.beanutils.DynaBean |
contains, get, get, get, getDynaClass, remove, set, set, set |
| Field Detail |
log
private static org.apache.commons.logging.Log log
- Commons Logging instance.
validatorResults
protected org.apache.commons.validator.ValidatorResults validatorResults
- The results returned from the validation performed
by the
Validator.
page
protected int page
- Used to indicate the current page of a multi-page form.
| Constructor Detail |
DynaValidatorForm
public DynaValidatorForm()
| Method Detail |
getPage
public int getPage()
- Gets page.
setPage
public void setPage(int page)
- Sets page.
validate
public org.apache.struts.action.ActionErrors validate(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
- Validate the properties that have been set from this HTTP request,
and return an
ActionErrorsobject that encapsulates any validation errors that have been found. If no errors are found, returnnullor anActionErrorsobject with no recorded error messages.
getValidationKey
public java.lang.String getValidationKey(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
- Returns the Validation key.
setPageFromDynaProperty
protected void setPageFromDynaProperty()
- Sets this.page to the value of the Dyna property "page" if it's defined. This is
used to setup the page variable before validation starts.
- Since:
- Struts 1.2
reset
public void reset(org.apache.struts.action.ActionMapping mapping, javax.servlet.http.HttpServletRequest request)
- Reset all properties to their default values.
getValidatorResults
public org.apache.commons.validator.ValidatorResults getValidatorResults()
- Get results of the validation performed by the
Validator.
setValidatorResults
public void setValidatorResults(org.apache.commons.validator.ValidatorResults validatorResults)
- Set results of the validation performed by the
Validator.
getResultValueMap
public java.util.Map getResultValueMap()
- Returns a
Mapof values returned from any validation that returns a value other thannullorBooleanwith the key the full property path of the field.
|
|||||||||
| Home >> All >> org >> apache >> struts >> [ validator overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC