Examples of LengthValidator


Examples of javax.faces.validator.LengthValidator

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

Examples of javax.faces.validator.LengthValidator

    }
    int maxLength = -1;
    final String pattern = null;
    for (final Validator validator : input.getValidators()) {
      if (validator instanceof LengthValidator) {
        final LengthValidator lengthValidator = (LengthValidator) validator;
        maxLength = lengthValidator.getMaximum();
      }
      /*if (validator instanceof RegexValidator) {
        RegexValidator regexValidator = (RegexValidator) validator;
        pattern = regexValidator.getPattern();
      }*/
 
View Full Code Here

Examples of javax.faces.validator.LengthValidator

    }
    int maxLength = 0;
    final String pattern = null;
    for (final Validator validator : input.getValidators()) {
      if (validator instanceof LengthValidator) {
        final LengthValidator lengthValidator = (LengthValidator) validator;
        maxLength = lengthValidator.getMaximum();
      }
        /*if (validator instanceof RegexValidator) {
          RegexValidator regexValidator = (RegexValidator) validator;
          pattern = regexValidator.getPattern();
        }*/
 
View Full Code Here

Examples of javax.faces.validator.LengthValidator

    protected Validator createValidator()
        throws JspException
    {
        setValidatorIdString(VALIDATOR_ID);
        LengthValidator validator = (LengthValidator)super.createValidator();
        if (null != _min){
            validator.setMinimum(_min);
        }
        if (null != _max){
            validator.setMaximum(_max);
        }
        return validator;
    }
View Full Code Here

Examples of javax.faces.validator.LengthValidator

    }
    int maxLength = 0;
    String pattern = null;
    for (Validator validator : input.getValidators()) {
      if (validator instanceof LengthValidator) {
        LengthValidator lengthValidator = (LengthValidator) validator;
        maxLength = lengthValidator.getMaximum();
      }
        /*if (validator instanceof RegexValidator) {
          RegexValidator regexValidator = (RegexValidator) validator;
          pattern = regexValidator.getPattern();
        }*/
 
View Full Code Here

Examples of javax.faces.validator.LengthValidator

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

Examples of org.apache.myfaces.trinidadinternal.validator.LengthValidator

  }

  @Override
  protected Validator createValidator() throws JspException
  {
    LengthValidator validator = (LengthValidator)super.createValidator();
    _setProperties(validator);
    return validator;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.validator.LengthValidator

  @Override
  protected Validator createValidator() throws JspException
  {
    String validatorId = LengthValidator.VALIDATOR_ID;
    Application appl = FacesContext.getCurrentInstance().getApplication();
    LengthValidator validator = (LengthValidator)appl.createValidator(validatorId);
    _setProperties(validator);
    return validator;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.validator.LengthValidator

  @Override
  protected Validator createValidator() throws JspException
  {
    String validatorId = LengthValidator.VALIDATOR_ID;
    Application appl = FacesContext.getCurrentInstance().getApplication();
    LengthValidator validator = (LengthValidator)appl.createValidator(validatorId);
    _setProperties(validator);
    return validator;
  }
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.validator.LengthValidator

    return super.doStartTag();
  }

  protected Validator createValidator() throws JspException
  {
    LengthValidator validator = (LengthValidator)super.createValidator();
    _setProperties(validator);
    return validator;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.