Package org.apache.tapestry5.annotations

Examples of org.apache.tapestry5.annotations.PageActivationContext.activate()


    {
        PageActivationContext annotation = field.getAnnotation(PageActivationContext.class);

        FieldAccess access = field.getAccess();

        if (annotation.activate())
        {
            transformation.addComponentEventHandler(EventConstants.ACTIVATE, 1,
                    "PageActivationContextWorker activate event handler",
                    createActivationHandler(field.getType(), access));
        }
View Full Code Here


    {
        PageActivationContext annotation = field.getAnnotation(PageActivationContext.class);

        FieldHandle handle = field.getHandle();

        if (annotation.activate())
        {
            support.addEventHandler(EventConstants.ACTIVATE, 1,
                    "PageActivationContextWorker activate event handler",
                    createActivationHandler(field.getTypeName(), handle));
        }
View Full Code Here

            handles[i] = field.getHandle();
            typeNames[i] = field.getTypeName();
            ++i;
        }

        if (firstAnnotation.activate())
        {
            support.addEventHandler(EventConstants.ACTIVATE, 1,
                    "PageActivationContextWorker activate event handler", createActivationHandler(handles, typeNames));
        }
View Full Code Here

        for (int i = 0; i < sortedFields.size(); ++i) {
            PlasticField field = sortedFields.get(i);
            PageActivationContext annotation = field.getAnnotation(PageActivationContext.class);
            expectedIndexes.add(i);
            actualIndexes.add(annotation.index());
            activates.add(annotation.activate());
            passivates.add(annotation.passivate());
        }

        List<String> errors = CollectionFactory.newList();
        if (!expectedIndexes.equals(actualIndexes)) {
View Full Code Here

    {
        PageActivationContext annotation = field.getAnnotation(PageActivationContext.class);

        FieldAccess access = field.getAccess();

        if (annotation.activate())
        {
            transformation.addComponentEventHandler(EventConstants.ACTIVATE, 1,
                    "PageActivationContextWorker activate event handler",
                    createActivationHandler(field.getType(), access));
        }
View Full Code Here

            PageActivationContext annotation = transformation.getFieldAnnotation(fieldName,
                                                                                 PageActivationContext.class);

            String fieldType = transformation.getFieldType(fieldName);

            if (annotation.activate())
            {
                TransformMethodSignature activate
                        = new TransformMethodSignature(Modifier.PROTECTED | Modifier.FINAL, "void",
                                                       "onActivate",
                                                       new String[] { fieldType }, null);
View Full Code Here

    {
        PageActivationContext annotation = field.getAnnotation(PageActivationContext.class);

        FieldHandle handle = field.getHandle();

        if (annotation.activate())
        {
            support.addEventHandler(EventConstants.ACTIVATE, 1,
                    "PageActivationContextWorker activate event handler",
                    createActivationHandler(field.getTypeName(), handle));
        }
View Full Code Here

        train_findFieldsWithAnnotation(ct, PageActivationContext.class,
                                       "myfield");
        train_getFieldAnnotation(ct, "myfield", PageActivationContext.class,
                                 annotation);
        train_getFieldType(ct, "myfield", CLASS_NAME);
        expect(annotation.activate()).andReturn(true);

        TransformMethodSignature sig = new TransformMethodSignature(
                Modifier.PROTECTED | Modifier.FINAL, "void", "onActivate",
                new String[]{CLASS_NAME}, null);
View Full Code Here

        train_findFieldsWithAnnotation(ct, PageActivationContext.class,
                                       "myfield");
        train_getFieldAnnotation(ct, "myfield", PageActivationContext.class,
                                 annotation);
        train_getFieldType(ct, "myfield", CLASS_NAME);
        expect(annotation.activate()).andReturn(false);

        expect(annotation.passivate()).andReturn(true);

        TransformMethodSignature sig = new TransformMethodSignature(
                Modifier.PROTECTED | Modifier.FINAL, "java.lang.Object",
View Full Code Here

        train_findFieldsWithAnnotation(ct, PageActivationContext.class,
                                       "myfield");
        train_getFieldAnnotation(ct, "myfield", PageActivationContext.class,
                                 annotation);
        train_getFieldType(ct, "myfield", CLASS_NAME);
        expect(annotation.activate()).andReturn(false);

        expect(annotation.passivate()).andReturn(false);

        replay();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.