Object coerced = elUtils.coerceToType(context, el, values);
for (String id : param.getValidatorIdList())
{
currentValidatorId = id;
Validator validator = context.getApplication().createValidator(id);
validator.validate(context, new NullComponent(), coerced);
}
if (param.getValidatorExpression() != null)
{
elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
new Object[] { context, new NullComponent(), coerced });
}
}
}
else
{
String value = context.getExternalContext().getRequestParameterMap().get(name);
if (value != null)
{
Object coerced = elUtils.coerceToType(context, el, value);
for (String id : param.getValidatorIdList())
{
currentValidatorId = id;
Validator validator = context.getApplication().createValidator(id);
validator.validate(context, new NullComponent(), coerced);
}
if (param.getValidatorExpression() != null)
{
elUtils.invokeMethod(context, param.getValidatorExpression().getELExpression(),
new Class<?>[] { FacesContext.class, UIComponent.class, Object.class },
new Object[] { context, new NullComponent(), coerced });
}
}
}
}
}