Package javax.faces.validator

Examples of javax.faces.validator.Validator.validate()


      while (validators.hasNext())
      {
        Validator validator = validators.next();
        try
        {
          validator.validate(context, this, newValue);
        }
        catch (ValidatorException ve)
        {
          // If the validator throws an exception, we're
          // invalid, and we need to add a message
View Full Code Here


        for (int i = 0; i < values.length; i++) {
            if (values[i].trim().length() == 0) {
                continue;
            }
            else try {
                validator.validate(facesContext, uiComponent, values[i]);
            }
            catch (ValidatorException e) {
                facesMsg = addMessage(facesMsg, e.getFacesMessage(), i, suffixMessageKey);
            }
        }
View Full Code Here

        for (int i = 0; i < validators.length; i++)
        {
            Validator validator = validators[i];
            try
            {
                validator.validate(context, input, convertedValue);
            }
            catch (ValidatorException e)
            {
                input.setValid(false);
                FacesMessage facesMessage = e.getFacesMessage();
View Full Code Here

        for (int i = 0; i < validators.length; i++)
        {
            Validator validator = validators[i];
            try
            {
                validator.validate(context, input, convertedValue);
            }
            catch (ValidatorException e)
            {
                input.setValid(false);
                FacesMessage facesMessage = e.getFacesMessage();
View Full Code Here

      while (validators.hasNext())
      {
        Validator validator = validators.next();
        try
        {
          validator.validate(context, this, newValue);
        }
        catch (ValidatorException ve)
        {
          // If the validator throws an exception, we're
          // invalid, and we need to add a message
View Full Code Here

        for (int i = 0; i < validators.length; i++)
        {
            Validator validator = validators[i];
            try
            {
                validator.validate(context, input, convertedValue);
            }
            catch (ValidatorException e)
            {
                input.setValid(false);
View Full Code Here

  protected void validateValue(FacesContext context, Object newValue) {
    Validator[] validators = getValidators();
      for (int i = 0; i < validators.length; i++) {
        Validator validator = (Validator) validators[i];
        try {
          validator.validate(context, this, newValue);
        }
        catch (ValidatorException ve) {
          // If the validator throws an exception, we're
          // invalid, and we need to add a message
          setValid(false);
View Full Code Here

      if (isValid() && !isEmpty) {
    Validator[] validators = getValidators();
    for (int i = 0; i < validators.length; i++) {
      Validator validator = (Validator) validators[i];
      try {
        validator.validate(context, this, newValue);
      }
      catch (ValidatorException ve) {
        // If the validator throws an exception, we're
        // invalid, and we need to add a message
        setValid(false);
View Full Code Here

            if (this.validators != null) {
                Iterator<Validator> validators = this.validators.iterator();
                while (validators.hasNext()) {
                    Validator validator = validators.next();
                    try {
                        validator.validate(context, this, newValue);
                    }
                    catch (ValidatorException ve) {
                        // If the validator throws an exception, we're
                        // invalid, and we need to add a message
                        setValid(false);
View Full Code Here

        for (int i = 0; i < validators.length; i++)
        {
            Validator validator = validators[i];
            try
            {
                validator.validate(context, input, convertedValue);
            }
            catch (ValidatorException e)
            {
                input.setValid(false);
                FacesMessage facesMessage = e.getFacesMessage();
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.