Package org.apache.tapestry.annotations

Examples of org.apache.tapestry.annotations.OnEvent


        replay();

        ClassTransformation ct = createClassTransformation(EventHandlerTarget.class, log);

        OnEvent annotation = ct.getMethodAnnotation(new MethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here


        replay();

        ClassTransformation ct = createClassTransformation(EventHandlerTarget.class, logger);

        OnEvent annotation = ct.getMethodAnnotation(
                new TransformMethodSignature("handler"),
                OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here

            builder.begin();

            closeCount++;
        }

        OnEvent annotation = transformation.getMethodAnnotation(method, OnEvent.class);

        String eventType = extractEventType(method, annotation);

        if (InternalUtils.isNonBlank(eventType))
        {
View Full Code Here

        replay();

        ClassTransformation ct = createClassTransformation(EventHandlerTarget.class, logger);

        OnEvent annotation = ct.getMethodAnnotation(new TransformMethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), "fred");
        assertEquals(annotation.component(), "alpha");

        verify();
    }
View Full Code Here

        replay();

        ClassTransformation ct = createClassTransformation(EventHandlerTarget.class, log);

        OnEvent annotation = ct.getMethodAnnotation(new MethodSignature("handler"), OnEvent.class);

        // Check that the attributes of the annotation match the expectation.

        assertEquals(annotation.value(), new String[]
        { "fred", "barney" });
        assertEquals(annotation.component(), new String[]
        { "alpha", "beta" });

        verify();
    }
View Full Code Here

    {
        // $1 is the event

        int closeCount = 0;

        OnEvent annotation = transformation.getMethodAnnotation(method, OnEvent.class);

        String[] eventTypes = extractEventTypes(method, annotation);

        if (eventTypes.length > 0)
        {
View Full Code Here

    @Test
    public void minimal_case()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        MethodSignature signature = new MethodSignature("foo");

        train_findMethods(ct, signature);
View Full Code Here

    @Test
    public void filter_by_event_type()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] eventTypes = new String[]
        { "gnip", "gnop" };

        MethodSignature signature = new MethodSignature("foo");
View Full Code Here

    @Test
    public void filter_by_component_id()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] componentIds = new String[]
        { "zork" };

        MethodSignature signature = new MethodSignature("foo");
View Full Code Here

    @Test
    public void filter_by_both()
    {
        ClassTransformation ct = newClassTransformation();
        MutableComponentModel model = newMutableComponentModel();
        OnEvent annotation = newOnEvent();

        String[] eventTypes = new String[]
        { "gnip", "gnop" };
        String[] componentIds = new String[]
        { "zork" };
View Full Code Here

TOP

Related Classes of org.apache.tapestry.annotations.OnEvent

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.