Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ComponentActionRequestHandler


public class ComponentActionDispatcherTest extends InternalBaseTestCase
{
    @Test
    public void no_dot_or_colon_in_path() throws Exception
    {
        ComponentActionRequestHandler handler = newComponentActionRequestHandler();
        Request request = mockRequest();
        Response response = mockResponse();

        train_getPath(request, "/foo/bar/baz");
View Full Code Here


    }

    @Test
    public void page_activation_context_in_request() throws Exception
    {
        ComponentActionRequestHandler handler = newComponentActionRequestHandler();
        Request request = mockRequest();
        Response response = mockResponse();
        ActionResponseGenerator generator = newMock(ActionResponseGenerator.class);

        train_getPath(request, "/mypage:eventname");

        train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, "alpha/beta");

        expect(
                handler.handle(
                        eq("mypage"),
                        eq(""),
                        eq("eventname"),
                        aryEq(new String[0]),
                        aryEq(new String[]
View Full Code Here

    }

    private void test(String requestPath, String logicalPageName, String nestedComponentId,
            String eventType, String... context) throws IOException
    {
        ComponentActionRequestHandler handler = newComponentActionRequestHandler();
        Request request = mockRequest();
        Response response = mockResponse();
        ActionResponseGenerator generator = newMock(ActionResponseGenerator.class);

        train_getPath(request, requestPath);

        train_getParameter(request, InternalConstants.PAGE_CONTEXT_NAME, null);

        expect(
                handler.handle(
                        eq(logicalPageName),
                        eq(nestedComponentId),
                        eq(eventType),
                        aryEq(context),
                        aryEq(new String[0]))).andReturn(generator);
View Full Code Here


    public void handle(String logicalPageName, String nestedComponentId, String eventType, String[] context,
                       String[] activationContext, ComponentActionRequestHandler handler) throws IOException
    {
        ComponentActionRequestHandler next = _request.isXHR() ? _ajaxHandler : handler;

        next.handle(logicalPageName, nestedComponentId, eventType, context, activationContext);
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.ComponentActionRequestHandler

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.