Package org.apache.tapestry5.runtime

Examples of org.apache.tapestry5.runtime.ComponentEvent.matches()


            {
                public void advise(MethodInvocation invocation)
                {
                    final ComponentEvent event = (ComponentEvent) invocation.getParameter(0);

                    boolean matches = !event.isAborted() && event.matches(eventType, "", minContextValues);

                    if (matches)
                    {
                        final Component instance = (Component) invocation.getInstance();
View Full Code Here


        public void advise(final MethodInvocation invocation)
        {
            final ComponentEvent event = (ComponentEvent) invocation.getParameter(0);

            boolean matches = !event.isAborted() && event.matches(eventType, "", minContextValues);

            if (matches)
            {
                tracker.run(operationDescription, new Runnable()
                {
View Full Code Here

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("eventType", "someId", 0));
        assertFalse(event.matches("foo", "someId", 0));

        verify();
    }
View Full Code Here

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("eventType", "someId", 0));
        assertFalse(event.matches("foo", "someId", 0));

        verify();
    }

    @Test
View Full Code Here

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("EVENTTYPE", "someid", 0));

        verify();
    }

    @Test
View Full Code Here

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("eventType", "someId", 0));

        assertFalse(event.matches("eventtype", "bar", 0));

        verify();
    }
View Full Code Here

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("eventType", "someId", 0));

        assertFalse(event.matches("eventtype", "bar", 0));

        verify();
    }

    @Test
View Full Code Here

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", context, handler, null, logger);

        assertTrue(event.matches("eventtype", "SOMEID", 0));

        verify();
    }

    @Test
View Full Code Here

                invocation.proceed();

                ComponentEvent event = (ComponentEvent) invocation.getParameter(0);

                if (!event.isAborted() && event.matches(eventType, "", minContextValues))
                {
                    event.setMethodDescription(methodDescription);

                    handler.handleEvent((Component) invocation.getInstance(), event);
View Full Code Here

                boolean didInvokeSomeHandler = false;

                for (EventHandlerMethodInvoker invoker : invokersArray)
                {
                    if (event.matches(invoker.getEventType(), invoker.getComponentId(),
                            invoker.getMinContextValueCount()))
                    {
                        didInvokeSomeHandler = true;

                        invoker.invokeEventHandlerMethod(event, instance);
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.