*/
@Override
public void setAttributes(FaceletContext context, Object component) {
super.setAttributes(context, component);
ValidateMultiple validateMultiple = (ValidateMultiple) component;
TagAttribute attribute = getRequiredAttribute("validator");
try { // Yes, this try-catch is ugly, but there's really no clean way to distinguish a VE from a ME.
ValueExpression valueExpression = attribute.getValueExpression(context, MultiFieldValidator.class);
MultiFieldValidator validator = (MultiFieldValidator) valueExpression.getValue(context);
validateMultiple.setValidator(validator);
}
catch (Exception e) { // At least, ClassCastException and PropertyNotFoundException are expected.
MethodExpression validateMethod = attribute.getMethodExpression(context, boolean.class, PARAM_TYPES);
validateMultiple.setValidateMethod(validateMethod);
}
}