Package org.apache.tapestry

Examples of org.apache.tapestry.ComponentEventHandler


    }

    @Test
    public void matches_on_component_id()
    {
        ComponentEventHandler handler = newComponentEventHandler();

        replay();
        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here


    }

    @Test
    public void component_id_matches_are_case_insensitive()
    {
        ComponentEventHandler handler = newComponentEventHandler();

        replay();
        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    }

    @Test
    public void coerce_context()
    {
        ComponentEventHandler handler = newComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
        { "27" }, handler, _coercer);
View Full Code Here

    }

    @Test
    public void coerce_when_not_enough_context()
    {
        ComponentEventHandler handler = newComponentEventHandler();
        Component component = newComponent();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
View Full Code Here

    }

    @Test
    public void unable_to_coerce()
    {
        ComponentEventHandler handler = newComponentEventHandler();
        Component component = newComponent();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", new String[]
View Full Code Here

    {
        Object result = new Object();
        String methodDescription = "foo.Bar.baz()";
        Component component = newComponent();

        ComponentEventHandler handler = newComponentEventHandler();

        train_handleResult(handler, result, component, methodDescription, true);

        replay();
View Full Code Here

    public void store_result_and_continue()
    {
        Object result = new Object();
        String methodDescription = "foo.Bar.baz()";
        Component component = newComponent();
        ComponentEventHandler handler = newComponentEventHandler();

        train_handleResult(handler, result, component, methodDescription, false);

        replay();
View Full Code Here

    @Test
    public void store_null_result_does_not_abort_or_invoke_handler()
    {
        Component component = newComponent();
        ComponentEventHandler handler = newComponentEventHandler();

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void store_result_when_aborted_is_failure()
    {
        Object result = new Object();
        ComponentEventHandler handler = newComponentEventHandler();
        Component component = newComponent();

        expect(handler.handleResult(result, component, "foo.Bar.baz()")).andReturn(true);

        replay();

        ComponentEvent event = new ComponentEventImpl("eventType", "someId", null, handler,
                _coercer);
View Full Code Here

        try
        {
            final Holder<ActionResponseGenerator> holder = Holder.create();

            ComponentEventHandler handler = new ComponentEventHandler()
            {
                public boolean handleResult(Object result, Component component,
                        String methodDescription)
                {
                    if (result instanceof Boolean) return ((Boolean) result);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ComponentEventHandler

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.