Save This Page
Home » commons-validator-1.3.1-src » org.apache.commons » validator » [javadoc | source]
org.apache.commons.validator
public class: Form [javadoc | source]
java.lang.Object
   org.apache.commons.validator.Form

All Implemented Interfaces:
    Serializable

This contains a set of validation rules for a form/JavaBean. The information is contained in a list of Field objects. Instances of this class are configured with a <form> xml element.

The use of FastHashMap is deprecated and will be replaced in a future release.

Field Summary
protected  String name    The name/key the set of validation rules is stored under. 
protected  List lFields    List of Fields. Used to maintain the order they were added in although individual Fields can be retrieved using Map of Fields. 
protected  FastHashMap hFields    Map of Fields keyed on their property value.
     
    protected  String inherit    The name/key of the form which this form extends from.
      since: Validator - 1.2.0
     
    Method from org.apache.commons.validator.Form Summary:
    addField,   containsField,   getExtends,   getField,   getFieldMap,   getFields,   getName,   isExtending,   isProcessed,   merge,   process,   setExtends,   setName,   toString,   validate,   validate
    Methods from java.lang.Object:
    equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
    Method from org.apache.commons.validator.Form Detail:
     public  void addField(Field f) 
      Add a Field to the Form.
     public boolean containsField(String fieldName) 
      Returns true if this Form contains a Field with the given name.
     public String getExtends() 
      Gets the name/key of the parent set of validation rules.
     public Field getField(String fieldName) 
      Returns the Field with the given name or null if this Form has no such field.
     protected Map getFieldMap() 
      Returns a Map of String field keys to Field objects.
     public List getFields() 
      A List of Fields is returned as an unmodifiable List.
     public String getName() 
      Gets the name/key of the set of validation rules.
     public boolean isExtending() 
      Get extends flag.
     public boolean isProcessed() 
      Whether or not the this Form was processed for replacing variables in strings with their values.
     protected  void merge(Form depends) 
      Merges the given form into this one. For any field in depends not present in this form, include it. depends has precedence in the way the fields are ordered.
     protected  void process(Map globalConstants,
        Map constants,
        Map forms) 
      Processes all of the Form's Fields.
     public  void setExtends(String inherit) 
      Sets the name/key of the parent set of validation rules.
     public  void setName(String name) 
      Sets the name/key of the set of validation rules.
     public String toString() 
      Returns a string representation of the object.
     ValidatorResults validate(Map params,
        Map actions,
        int page) throws ValidatorException 
      Validate all Fields in this Form on the given page and below.
     ValidatorResults validate(Map params,
        Map actions,
        int page,
        String fieldName) throws ValidatorException 
      Validate all Fields in this Form on the given page and below.