Package javax.faces.validator

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


        Assert.assertEquals("input validator", 1, input.getValidators().length);

        Validator v = input.getValidators()[0];

        v.validate(facesContext, input, "4333");
    }

    @Test
    public void testValidateDoubleRangeHandler() throws Exception
    {
View Full Code Here


        Assert.assertEquals("input validator", 1, input.getValidators().length);

        Validator v = input.getValidators()[0];

        v.validate(facesContext, input, new Double(1.8));
    }

    @Test
    public void testValidateLengthHandler() throws Exception
    {
View Full Code Here

        Assert.assertEquals("input validator", 1, input.getValidators().length);

        Validator v = input.getValidators()[0];

        v.validate(facesContext, input, "beans");
    }

    @Test
    public void testValidateLongRangeHandler() throws Exception
    {
View Full Code Here

        Assert.assertEquals("input validator", 1, input.getValidators().length);

        Validator v = input.getValidators()[0];

        v.validate(facesContext, input, new Long(2000));
    }

    @Test
    public void testValueChangeListenerHandler() throws Exception
    {
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)
            {
                holder.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);
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

        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

      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

      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

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.