Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.ValidatorException


        {
            String value = component.getSubmittedValue(cycle);
           
            if (component.isRequired() && HiveMind.isBlank(value))
            {
                throw new ValidatorException(buildRequiredMessage(component), ValidationConstraint.REQUIRED);
            }
           
            component.bind(writer, cycle);
        }
        catch (ValidatorException e)
View Full Code Here


            throws ValidatorException
    {
        String string = (String) object;

        if (string.length() > _maxLength)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.MAXIMUM_WIDTH);
    }
View Full Code Here

            throws ValidatorException
    {
        String string = (String) object;

        if (string.length() < _minLength)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.MINIMUM_WIDTH);
    }
View Full Code Here

            throws ValidatorException
    {
        if (object == null)
        {
            String message = buildMessage(messages, field);
            throw new ValidatorException(message, ValidationConstraint.REQUIRED);
        }
    }
View Full Code Here

            throws ValidatorException
    {
        Number value = (Number) object;

        if (value.doubleValue() > _max)
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.TOO_LARGE);
    }
View Full Code Here

        { "form", form, "value", Boolean.TRUE, "name", "checkbox", "validatableFieldSupport", vfs });

        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycleGetParameter("checkbox", null);

        ValidatorException exception = new ValidatorException("failed");
       
        try
        {
          vfs.validate(cb, writer, cycle, null);
          vfsc.setThrowable(exception);
View Full Code Here

        trainGetElementId(formc, form, component, "barney");
        trainIsRewinding(formc, form, true);

        trainGetParameter(cyclec, cycle, "barney", "10");

        ValidatorException exception = new ValidatorException("test");
       
        try
        {
            tfs.parse(component, "10");
            tfsc.setThrowable(exception);
View Full Code Here

        trainGetElementId(formc, form, component, "barney");
        trainIsRewinding(formc, form, true);

        trainGetParameter(cyclec, cycle, "barney", "10");

        ValidatorException exception = new ValidatorException("test");
       
        Integer value = new Integer(10);
       
        try
        {
View Full Code Here

        { "form", form, "value", Boolean.FALSE, "name", "checkbox", "validatableFieldSupport", vfs });

        IMarkupWriter writer = newWriter();
        IRequestCycle cycle = newCycleGetParameter("checkbox", "foo");

        ValidatorException exception = new ValidatorException("failed");
       
        try
        {
          vfs.validate(cb, writer, cycle, "foo");
          vfsc.setThrowable(exception);
View Full Code Here

        trainGetElementId(form, component, "barney");
        trainIsRewinding(form, true);

        trainGetParameter(cycle, "barney", " text area value ");

        ValidatorException exception = new ValidatorException("test");
       
        try
        {
            tfs.parse(component, " text area value ");
            tfsc.setThrowable(exception);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.valid.ValidatorException

Copyright © 2018 www.massapicom. 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.