| java.lang.Object org.apache.struts.action.ActionForm org.apache.struts.validator.ValidatorForm
All known Subclasses: org.apache.struts.webapp.example2.RegistrationForm, org.apache.struts.validator.BeanValidatorForm, org.apache.struts.webapp.upload.UploadForm, org.apache.struts.webapp.validator.RegistrationForm, org.apache.struts.webapp.example.RegistrationForm, org.apache.struts.validator.ValidatorActionForm, org.apache.struts.webapp.validator.TypeForm,
ValidatorForm | public class ValidatorForm extends ActionForm implements Serializable(Code) | | This class extends ActionForm 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
ValidatorPlugin definition in struts-config.xml for
validation rules.
version: $Rev: 471754 $ $Date: 2005-05-07 12:11:38 -0400 (Sat, 07 May 2005) version: $ See Also: org.apache.struts.action.ActionForm since: Struts 1.1 |
Field Summary | |
protected int | page Used to indicate the current page of a multi-page form. | protected ValidatorResults | validatorResults The results returned from the validation performed by the
Validator . |
page | protected int page(Code) | | Used to indicate the current page of a multi-page form.
|
validatorResults | protected ValidatorResults validatorResults(Code) | | The results returned from the validation performed by the
Validator .
|
getPage | public int getPage()(Code) | | Gets page.
page number |
getResultValueMap | public Map getResultValueMap()(Code) | | 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.
Map of non-null values |
getValidationKey | public String getValidationKey(ActionMapping mapping, HttpServletRequest request)(Code) | | Returns the Validation key.
Parameters: mapping - The mapping used to select this instance Parameters: request - The servlet request we are processing validation key - the form element's name in this case |
getValidatorResults | public ValidatorResults getValidatorResults()(Code) | | Get results of the validation performed by the Validator .
results of the validation |
reset | public void reset(ActionMapping mapping, HttpServletRequest request)(Code) | | Reset all properties to their default values.
Parameters: mapping - The mapping used to select this instance Parameters: request - The servlet request we are processing |
setPage | public void setPage(int page)(Code) | | Sets page.
Parameters: page - page number |
setValidatorResults | public void setValidatorResults(ValidatorResults validatorResults)(Code) | | Set results of the validation performed by the Validator .
Parameters: validatorResults - results of validation |
validate | public ActionErrors validate(ActionMapping mapping, HttpServletRequest request)(Code) | | 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.
Parameters: mapping - The mapping used to select this instance Parameters: request - The servlet request we are processing ActionErrors object that encapsulates anyvalidation errors |
|
|