Package org.apache.tapestry.valid

Examples of org.apache.tapestry.valid.ValidatorException


        String e1 = "And now for something completely different.";
        String e2 = "A man with three buttocks.";

        d.setFormComponent(f1);
        d.record(new ValidatorException(e1, null));

        d.setFormComponent(f2);
        d.record(new ValidatorException(e2, null));

        d.setFormComponent(f1);
        d.reset();

        d.setFormComponent(f2);
View Full Code Here


    {
        IFormComponent field = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();
        delegate.setFormComponent(field);
        delegate.record(new ValidatorException(message));
    }
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

            throws ValidatorException
    {
        String input = (String) object;

        if (!_matcher.matches(PATTERN, input))
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.EMAIL_FORMAT);
    }
View Full Code Here

            throws ValidatorException
    {
        String input = (String) object;

        if (!_matcher.matches(_pattern, input))
            throw new ValidatorException(buildMessage(messages, field),
                    ValidationConstraint.PATTERN_MISMATCH);
    }
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
    {
        Number value = (Number) object;

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

        verify();
    }

    public void testNotNullTranslateFailBind() throws Exception
    {
        ValidatorException ex = new ValidatorException("Woops");

        _component.getForm();
        _componentControl.setReturnValue(_form);

        _form.getDelegate();
View Full Code Here

        _component.getTranslator();
        _componentControl.setReturnValue(_translator);

        _support.setThreadLocale(newThreadLocale());

        ValidatorException ex = new ValidatorException("");

        Object object = new Object();

        _translator.parse(_component, "some value");
        _translatorControl.setReturnValue(object);
View Full Code Here

    {
        IFormComponent field = (IFormComponent) getComponent(componentId);

        IValidationDelegate delegate = getValidationDelegate();
        delegate.setFormComponent(field);
        delegate.record(new ValidatorException(message));
    }
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.