protected Validator createValidator()
throws JspException
{
FacesContext facesContext = FacesContext.getCurrentInstance();
setValidatorId(VALIDATOR_ID);
DoubleRangeValidator validator = (DoubleRangeValidator)super.createValidator();
if (_minimum != null)
{
if (UIComponentTag.isValueReference(_minimum))
{
ValueBinding vb = facesContext.getApplication().createValueBinding(_minimum);
validator.setMinimum(ConverterUtils.convertToDouble(vb.getValue(facesContext)));
}
else
{
validator.setMinimum(ConverterUtils.convertToDouble(_minimum));
}
}
if (_maximum != null)
{
if (UIComponentTag.isValueReference(_maximum))
{
ValueBinding vb = facesContext.getApplication().createValueBinding(_maximum);
validator.setMaximum(ConverterUtils.convertToDouble(vb.getValue(facesContext)));
}
else
{
validator.setMaximum(ConverterUtils.convertToDouble(_maximum));
}
}
return validator;
}