Package javax.faces.application

Examples of javax.faces.application.Application.createValidator()


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

  private void _setProperties(
View Full Code Here


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

  private void _setProperties(
View Full Code Here

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

  private void _setProperties(
View Full Code Here

  @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;
  }

  private void _setProperties(
View Full Code Here

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

  private void _setProperties(
View Full Code Here

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

  private void _setProperties(
View Full Code Here

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

  private void _setProperties(
View Full Code Here

        FacesContext facesContext = FacesContext.getCurrentInstance();
        Application application = facesContext.getApplication();
        if (UIComponentTag.isValueReference(_validatorId))
        {
            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createValidator(_validatorId);
        }
View Full Code Here

            ValueBinding vb = facesContext.getApplication().createValueBinding(_validatorId);
            return application.createValidator((String)vb.getValue(facesContext));
        }
        else
        {
            return application.createValidator(_validatorId);
        }
    }
}
View Full Code Here

    }

    protected Validator createValidator() throws JspException {
        String validatorId = "org.apache.myfaces.validator.Equal";
        Application appl = FacesContext.getCurrentInstance().getApplication();
        Validator validator = (Validator)appl.createValidator(validatorId);
        _setProperties(validator);
        return validator;
    }
   
    protected void _setProperties(Validator val) throws JspException {
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.