UIInput number1 = (UIInput)facesContext.getViewRoot().findComponent("form1:number1");
Validator[] validators = number1.getValidators();
if (validators == null || validators.length == 0)
{
number1.addValidator(new LongRangeValidator(10, 1));
}
UIInput number2 = (UIInput)facesContext.getViewRoot().findComponent("form1:number2");
validators = number2.getValidators();
if (validators == null || validators.length == 0)