Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.ValidatorException


            throws ValidatorException
    {
        String string = (String) object;

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


        {
            String value = component.getSubmittedValue(cycle);

            if (component.isRequired() && HiveMind.isBlank(value))
            {
                throw new ValidatorException(buildRequiredMessage(component),
                        ValidationConstraint.REQUIRED);
            }

            component.bind(writer, cycle);
        }
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 (_min > value.doubleValue())
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.TOO_SMALL);
    }
View Full Code Here

        converter.coerceValue(validator, Iterator.class);
        converterControl.setReturnValue(Collections.singleton(validator).iterator());

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);
       
        ValidatorException expected = new ValidatorException("test");
       
        try
        {
            validator.validate(field, messages, object);
            validatorControl.setMatcher(new AggregateArgumentsMatcher(new ArgumentMatcher[]
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

        delegate.recordFieldInputValue(text);

        field.getTranslator();
        fieldControl.setReturnValue(translator);

        ValidatorException expected = new ValidatorException("Failure");

        ValidationMessages messages = new ValidationMessagesImpl(field, Locale.ENGLISH);

        translator.parse(field, messages, text);
        translatorControl.setMatcher(new AlwaysMatcher());
View Full Code Here

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

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

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

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

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

        ValidatorException exception = new ValidatorException("test");
       
        try
        {
            tfs.parse(component, " text area value ");
            tfsc.setReturnValue("text area value");
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.