Package org.apache.tapestry5

Examples of org.apache.tapestry5.ComponentEventCallback


        {
            public Object answer() throws Throwable
            {
                Object[] args = EasyMock.getCurrentArguments();

                ComponentEventCallback callback = (ComponentEventCallback) args[2];

                return callback.handleResult(context);
            }
        };

        expect(element.triggerEvent(EasyMock.eq(EventConstants.PASSIVATE),
                                    (Object[]) EasyMock.isNull(),
View Full Code Here


        ComponentPageElement element = page.getRootElement();

        final Holder<Object[]> holder = Holder.create();

        ComponentEventCallback callback = new ComponentEventCallback()
        {
            public boolean handleResult(Object result)
            {
                holder.put(typeCoercer.coerce(result, Object[].class));
View Full Code Here

    }

    @Test
    public void matches_on_event_type()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

     * @since 5.2.0
     */
    @Test
    public void no_match_one_event_is_aborted()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        Object result = new Object();
        ComponentPageElementResources resources = mockResources();
        ComponentModel model = mockComponentModel();
View Full Code Here

    }

    @Test
    public void event_type_match_is_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

    }

    @Test
    public void matches_on_component_id()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

    }

    @Test
    public void component_id_matches_are_case_insensitive()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();

        train_isDebugEnabled(logger, false);
View Full Code Here

    }

    @Test
    public void coerce_context()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        ComponentPageElementResources resources = mockComponentPageElementResources();
        EventContext context = mockEventContext();
        Integer value = new Integer(27);
        Logger logger = mockLogger();
View Full Code Here

    }

    @Test
    public void coerce_when_not_enough_context()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        Logger logger = mockLogger();

        ComponentModel model = mockComponentModel();
View Full Code Here

    }

    @Test
    public void unable_to_coerce()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        EventContext context = mockEventContext();
        ComponentPageElementResources resources = mockComponentPageElementResources();
        Logger logger = mockLogger();
        ComponentModel model = mockComponentModel();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ComponentEventCallback

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.