Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.Event


            if (!reverse)
                invocation.proceed();

            // All render phase methods take the same two parameters (writer and event)

            Event event = (Event) invocation.getParameter(1);

            if (event.isAborted())
                return;

            Object instance = invocation.getInstance();
            MarkupWriter writer = (MarkupWriter) invocation.getParameter(0);

            for (Invoker invoker : invokers)
            {
                invoker.invoke(instance, writer, event);

                if (event.isAborted())
                    return;
            }

            // Parent class implementation goes last.
View Full Code Here


        map.put("alpha", validator);
        map.put("beta", validator);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, null, map, null);

        try
        {
            source.createValidator(field, "foo", null);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(), "Unknown validator type 'foo'.  Configured validators are alpha, beta.");
View Full Code Here

        train_getValueType(validator, Object.class);
        validator.validate(field, null, formatter, inputValue);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, null);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        train_getValueType(validator, Object.class);
        validator.validate(field, null, formatter, inputValue);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, null);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        train_getValueType(validator, Object.class);
        validator.validate(field, null, formatter, inputValue);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, null);

        FieldValidator fieldValidator = source.createValidator(field, "required", null);

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        ValidatorMacro macro = mockValidatorMacro();
        train_alwaysNull(macro);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidators(field, "minlength");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        ValidatorMacro macro = mockValidatorMacro();
        train_alwaysNull(macro);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidators(field, "minlength");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        ValidatorMacro macro = mockValidatorMacro();
        train_alwaysNull(macro);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        try
        {
            source.createValidators(field, "minlength");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(
View Full Code Here

        ValidatorMacro macro = mockValidatorMacro();
        train_alwaysNull(macro);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidators(field, "required");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

        ValidatorMacro macro = mockValidatorMacro();
        train_alwaysNull(macro);

        replay();

        FieldValidatorSource source = new FieldValidatorSourceImpl(messagesSource, coercer, fs, map, macro);

        FieldValidator fieldValidator = source.createValidators(field, "required,minLength=15");

        fieldValidator.validate(inputValue);

        verify();
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.runtime.Event

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.