|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.townleyenterprises.validator.BasicFormValidator
This class is a bean which provides a basic implementation of a form validator which will perform the validations in the correct order.
| Constructor Summary | |
BasicFormValidator()
Basic constructor |
|
| Method Summary | |
void |
addFieldSetValidator(FieldSetValidator validator)
This method is used to add a new field set validator |
void |
addFieldValidator(java.lang.String name,
FieldValidator validator)
This method is used to add a new validator for a specific field of the form. |
void |
addValidationListener(ValidationListener listener)
|
boolean |
getAbortOnFailure()
This method is used to determine the mode of the form validator. |
FieldSetValidator[] |
getFieldSetValidators()
This method returns the currently configured field set validators as an array. |
FieldValidator[] |
getFieldValidators()
This method returns the currently configured field validators as an array. |
ValidationListener[] |
getValidationListeners()
|
void |
removeFieldSetValidator(FieldSetValidator validator)
This method is used to remove a new field set validator |
void |
removeFieldValidator(FieldValidator validator)
This method is used to remove a specific validator instance. |
void |
removeValidationListener(ValidationListener listener)
|
void |
setAbortOnFailure(boolean val)
This method is used to set the validation mode of the form. |
void |
validate(Form form)
This method simply deferrs to the validate(Form,Locale) method. |
void |
validate(Form form,
java.util.Locale locale)
This method performs the validations in the default order according to the order specified in the interface. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicFormValidator()
| Method Detail |
public boolean getAbortOnFailure()
false, the
validator will attempt to perform all of the registered
validations once and notify the listeners of any failures.
If it returns true, the validation operation
will stop after the first validation failure.
getAbortOnFailure in interface FormValidatorpublic void setAbortOnFailure(boolean val)
setAbortOnFailure in interface FormValidatorval - the value of the flag
public void validate(Form form)
throws java.lang.Exception
validate(Form,Locale) method.
validate in interface FormValidatorform - the form to validate
java.lang.Exception - if any of the validations fail
public void validate(Form form,
java.util.Locale locale)
throws java.lang.Exception
abortOnFailure property, this method
throws an exception.
validate in interface FormValidatorform - the form to validatelocale - the specific locale to use
java.lang.Exception - if any of the validations fail
public void addFieldValidator(java.lang.String name,
FieldValidator validator)
FormValidator
addFieldValidator in interface FormValidatorname - the field namevalidator - the validator instancepublic void removeFieldValidator(FieldValidator validator)
FormValidator
removeFieldValidator in interface FormValidatorvalidator - the validator to removepublic void addFieldSetValidator(FieldSetValidator validator)
FormValidator
addFieldSetValidator in interface FormValidatorvalidator - the validator to addpublic void removeFieldSetValidator(FieldSetValidator validator)
FormValidator
removeFieldSetValidator in interface FormValidatorvalidator - the validator to removepublic FieldValidator[] getFieldValidators()
FormValidator
getFieldValidators in interface FormValidatorpublic FieldSetValidator[] getFieldSetValidators()
FormValidator
getFieldSetValidators in interface FormValidatorpublic void addValidationListener(ValidationListener listener)
addValidationListener in interface FormValidatorpublic void removeValidationListener(ValidationListener listener)
removeValidationListener in interface FormValidatorpublic ValidationListener[] getValidationListeners()
getValidationListeners in interface FormValidator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||