protected void processingValidators(FacesContext context, Object newValue, boolean isEmpty) {
if (isValid() && !isEmpty) {
Validator[] validators = getValidators();
for (int i = 0; i < validators.length; i++) {
Validator validator = (Validator) validators[i];
try {
validator.validate(context, this, newValue);
}
catch (ValidatorException ve) {
// If the validator throws an exception, we're
// invalid, and we need to add a message
setValid(false);
FacesMessage message = ve.getFacesMessage();
if (message != null) {
message.setSeverity(FacesMessage.SEVERITY_ERROR);
context.addMessage(getClientId(context), message);
}
}
}
MethodBinding validator = getValidator();
if (validator != null) {
try {
validator.invoke(context,
new Object[] { context, this, newValue});
}
catch (EvaluationException ee) {
if (ee.getCause() instanceof ValidatorException) {
ValidatorException ve =