Package org.apache.tapestry

Examples of org.apache.tapestry.ComponentEventCallback


    }

    @Test
    public void unable_to_coerce()
    {
        ComponentEventCallback handler = mockComponentEventHandler();
        Component component = mockComponent();

        replay();

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


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

        ComponentEventCallback handler = mockComponentEventHandler();

        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 = mockComponent();
        ComponentEventCallback handler = mockComponentEventHandler();

        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 = mockComponent();
        ComponentEventCallback handler = mockComponentEventHandler();

        replay();

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

    @SuppressWarnings("unchecked")
    @Test
    public void store_result_when_aborted_is_failure()
    {
        Object result = new Object();
        ComponentEventCallback handler = mockComponentEventHandler();
        Component component = mockComponent();

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

        replay();

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

        return new IAnswer<Boolean>()
        {
            @SuppressWarnings("unchecked")
            public Boolean answer() throws Throwable
            {
                ComponentEventCallback handler = (ComponentEventCallback) EasyMock
                        .getCurrentArguments()[2];

                handler.handleResult(new Object[]{"foo", "bar"}, null, null);

                return true;
            }
        };
    }
View Full Code Here

     */
    private String[] collectActivationContextForPage(final Page page)
    {
        final List context = newList();

        ComponentEventCallback callback = new ComponentEventCallback()
        {
            @SuppressWarnings("unchecked")
            public boolean handleResult(Object result)
            {
                PassivateContextHandler contextHandler = _registry.getByInstance(result);
View Full Code Here

     */
    private String[] collectActivationContextForPage(final Page page)
    {
        final List context = newList();

        ComponentEventCallback callback = new ComponentEventCallback()
        {
            @SuppressWarnings("unchecked")
            public boolean handleResult(Object result, Component component, String methodDescription)
            {
                PassivateContextHandler contextHandler = _registry.getByInstance(result);
View Full Code Here

TOP

Related Classes of org.apache.tapestry.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.