Examples of createValidator()


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

  protected Validator createValidator() throws JspException {
    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    final SubmittedValueLengthValidator validator
        = (SubmittedValueLengthValidator) application.createValidator(SubmittedValueLengthValidator.VALIDATOR_ID);
    final ELContext elContext = FacesContext.getCurrentInstance().getELContext();

    if (minimum != null) {
      try {
        validator.setMinimum((Integer) minimum.getValue(elContext));

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

  protected Validator createValidator() throws JspException {

    final FacesContext facesContext = FacesContext.getCurrentInstance();
    final Application application = facesContext.getApplication();
    final FileItemValidator validator = (FileItemValidator) application.createValidator(FileItemValidator.VALIDATOR_ID);
    final ELContext elContext = facesContext.getELContext();

    if (maxSize != null) {
      try {
        validator.setMaxSize((Integer) maxSize.getValue(elContext));

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

        }

        // we now have the complete List of Validator IDs to add to the
        // target EditablValueHolder
        for (String id : validatorIds) {
            Validator v = application.createValidator(id);
            // work backwards up the stack of ValidatorInfo to find the
            // nearest matching ValidatorInfo to apply attributes
            if (validatorStack != null) {
                for (int i = validatorStack.size() - 1; i >= 0; i--) {
                    ValidatorInfo info = validatorStack.get(i);

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

    }

    protected Validator createValidator() throws JspException {
        String validatorId = "org.apache.myfaces.commons.validator.CompareTo";
        Application appl = FacesContext.getCurrentInstance().getApplication();
        Validator validator = (Validator)appl.createValidator(validatorId);
        _setProperties(validator);
        return validator;
    }
   
    protected void _setProperties(Validator val) throws JspException {

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

  @Override
  protected Validator createValidator() throws JspException
  {
    Application app = FacesContext.getCurrentInstance().getApplication();
    PasswordValidator validator =
                (PasswordValidator)app.createValidator(PasswordValidator.VALIDATOR_ID);
    return validator;
  }
}

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

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

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

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

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

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

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

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

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

        try
        {
            // first check if an ValidatorId was set by a method
            if (null != _validatorIdString)
            {
                validator = application.createValidator(_validatorIdString);
            } else if (null != _validatorId)
            {
                String validatorId = (String) _validatorId.getValue(elContext);
                validator = application.createValidator(validatorId);
            }
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.