Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ComponentMethodAdvice


    }

    private void handleAssetsDuringSetupRenderPhase(ClassTransformation transformation, MutableComponentModel model,
            final FieldAccess access)
    {
        ComponentMethodAdvice advice = new ComponentMethodAdvice()
        {

            @SuppressWarnings("unchecked")
            public void advise(ComponentMethodInvocation invocation)
            {
View Full Code Here


    }

    private void storeLocalizedAssetsAtPageLoad(ClassTransformation transformation, final Resource baseResource,
            final List<String> expandedPaths, final FieldAccess access)
    {
        ComponentMethodAdvice advice = new ComponentMethodAdvice()
        {
            public void advise(ComponentMethodInvocation invocation)
            {
                invocation.proceed();
View Full Code Here

                        "void", "protectedVoidNoArgs", null, null);
                TransformMethod pvna = transformation.getOrCreateMethod(targetMethodSignature);

                final MethodAccess pvnaAccess = pvna.getAccess();

                transformation.getOrCreateMethod(RUN).addAdvice(new ComponentMethodAdvice()
                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        invocation.proceed();
View Full Code Here

                        { SQLException.class.getName() });
                TransformMethod targetMethod = transformation.getOrCreateMethod(targetMethodSignature);

                final MethodAccess targetAccess = targetMethod.getAccess();

                transformation.getOrCreateMethod(RUN).addAdvice(new ComponentMethodAdvice()
                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        invocation.proceed();
View Full Code Here

                        new String[]
                        { "int" }, null);

                TransformMethod operate = transformation.getOrCreateMethod(operateSig);

                operate.addAdvice(new ComponentMethodAdvice()
                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        // This advice *replaces* the original do-nothing method, because
                        // it never calls invocation.proceed().
View Full Code Here

                        "process", new String[]
                        { "java.lang.String", "int" }, null);

                TransformMethod process = transformation.getOrCreateMethod(processSig);

                process.addAdvice(new ComponentMethodAdvice()
                {
                    public void advise(ComponentMethodInvocation invocation)
                    {
                        // Don't even bother with proceed() this time, which is OK (but
                        // somewhat rare).
View Full Code Here

        {
            invokeAdvisedMethod();
            return;
        }

        ComponentMethodAdvice advice = info.getAdvice(adviceIndex++);

        // When this advice invokes proceed(), we can advance to the next advice,
        // and then ultimately to the advised method.

        advice.advise(this);
    }
View Full Code Here

        {
            invokeAdvisedMethod();
            return;
        }

        ComponentMethodAdvice advice = info.getAdvice(adviceIndex++);

        // When this advice invokes proceed(), we can advance to the next advice,
        // and then ultimately to the advised method.

        advice.advise(this);
    }
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

TOP

Related Classes of org.apache.tapestry5.services.ComponentMethodAdvice

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.