| org.apache.struts.action.DynaActionForm org.apache.struts.validator.DynaValidatorForm
All known Subclasses: org.apache.struts.validator.DynaValidatorActionForm,
DynaValidatorForm | public class DynaValidatorForm extends DynaActionForm implements DynaBean,Serializable(Code) | | 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
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.
Returns a Map of values, otherwise returns null ifno results. |
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 .
validator results as ValidatorResults object |
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 |
setPageFromDynaProperty | protected void setPageFromDynaProperty()(Code) | | 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 |
setValidatorResults | public void setValidatorResults(ValidatorResults validatorResults)(Code) | | Set results of the validation performed by the Validator .
Parameters: validatorResults - Set results of the validation performed |
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. |
Methods inherited from org.apache.struts.action.DynaActionForm | public boolean contains(String name, String key)(Code)(Java Doc) public Object get(String name)(Code)(Java Doc) public Object get(String name, int index)(Code)(Java Doc) public Object get(String name, String key)(Code)(Java Doc) public DynaClass getDynaClass()(Code)(Java Doc) protected DynaProperty getDynaProperty(String name)(Code)(Java Doc) public Map getMap()(Code)(Java Doc) public String getString(String name)(Code)(Java Doc) public String[] getStrings(String name)(Code)(Java Doc) public void initialize(ActionMapping mapping)(Code)(Java Doc) public void initialize(FormBeanConfig config)(Code)(Java Doc) protected boolean isDynaAssignable(Class dest, Class source)(Code)(Java Doc) public void remove(String name, String key)(Code)(Java Doc) public void reset(ActionMapping mapping, ServletRequest request)(Code)(Java Doc) public void reset(ActionMapping mapping, HttpServletRequest request)(Code)(Java Doc) public void set(String name, Object value)(Code)(Java Doc) public void set(String name, int index, Object value)(Code)(Java Doc) public void set(String name, String key, Object value)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|