Ensure that classes implementing the BindBeforeValidation interface have the method called *before* validation, as Validator implementations will sometimes check the properties modified by BindBeforeValidation implementations.

This commit is contained in:
Ben Alex 2005-08-21 10:34:50 +00:00
parent c5e060dc09
commit ebb99abc78
1 changed files with 3 additions and 3 deletions

View File

@ -135,13 +135,13 @@ public class ValidationManagerImpl implements InitializingBean,
Class clazz = currentDomainObject.getClass();
try {
// Call bindSupport() if this class wishes
BindBeforeValidationUtils.bindIfRequired(currentDomainObject);
Errors errors = new BindException(currentDomainObject,
clazz.getName());
Validator v = findValidator(clazz);
// Call bindSupport() if this class wishes
BindBeforeValidationUtils.bindIfRequired(currentDomainObject);
// Perform validation
v.validate(currentDomainObject, errors);