Examples of ActionResponseGenerator


Examples of org.apache.tapestry.services.ActionResponseGenerator

        String activationContextValue = request.getParameter(InternalConstants.PAGE_CONTEXT_NAME);

        String[] activationContext = activationContextValue == null ? _emptyString
                : decodeContext(activationContextValue);

        ActionResponseGenerator responseGenerator = _componentActionRequestHandler.handle(
                logicalPageName,
                nestedComponentId,
                eventType,
                eventContext,
                activationContext);

        responseGenerator.sendClientResponse(response);

        return true;
    }
View Full Code Here

Examples of org.apache.tapestry.services.ActionResponseGenerator

        String activationContextValue = request.getParameter(InternalConstants.PAGE_CONTEXT_NAME);

        String[] activationContext = activationContextValue == null ? _emptyString
                : decodeContext(activationContextValue);

        ActionResponseGenerator responseGenerator = _actionLinkHandler.handle(
                logicalPageName,
                nestedComponentId,
                eventType,
                eventContext,
                activationContext);

        responseGenerator.sendClientResponse(response);

        return true;
    }
View Full Code Here

Examples of org.apache.tapestry.services.ActionResponseGenerator

            String eventType, String... context) throws IOException
    {
        ActionLinkHandler handler = newActionLinkHandler();
        Request request = newRequest();
        Response response = newResponse();
        ActionResponseGenerator generator = newMock(ActionResponseGenerator.class);

        train_getPath(request, requestPath);

        expect(
                handler.handle(eq(logicalPageName), eq(nestedComponentId), eq(eventType), EasyMock
                        .aryEq(context))).andReturn(generator);

        generator.sendClientResponse(response);

        replay();

        Dispatcher dispatcher = new ComponentEventDispatcher(handler);
View Full Code Here

Examples of org.apache.tapestry.services.ActionResponseGenerator

     *            The ComponentInvocation object corresponding to the action link.
     * @return The DOM created. Typically you will assert against it.
     */
    public Document invoke(ComponentInvocation invocation)
    {
        ActionResponseGenerator generator = click(invocation);

        if (generator instanceof LinkActionResponseGenerator)
        {
            LinkActionResponseGenerator linkGenerator = (LinkActionResponseGenerator) generator;

            Link link = linkGenerator.getLink();

            ComponentInvocation followup = _componentInvocationMap.get(link);

            return _followupInvoker.invoke(followup);
        }

        String message = String
                .format(
                        "ActionResponseGenerator %s is an instance of class %s, which is not compatible with PageTester.",
                        generator,
                        generator.getClass());

        throw new RuntimeException(message);
    }
View Full Code Here

Examples of org.apache.tapestry.services.ActionResponseGenerator

        String eventType = path.substring(lastDotx + 1, slashx);

        String[] context = slashx < path.length() ? path.substring(slashx + 1).split("/")
                : new String[0];

        ActionResponseGenerator responseGenerator = _actionLinkHandler.handle(
                logicalPageName,
                nestedComponentId,
                eventType,
                context);

        responseGenerator.sendClientResponse(response);

        return true;
    }
View Full Code Here

Examples of org.apache.tapestry.services.ActionResponseGenerator

        ComponentEventHandler handler = new ComponentEventHandler()
        {
            @SuppressWarnings("unchecked")
            public boolean handleResult(Object result, Component component, String methodDescription)
            {
                ActionResponseGenerator generator = _resultProcessor.processComponentEvent(
                        result,
                        component,
                        methodDescription);

                holder.put(generator);

                return true;
            }
        };

        element.triggerEvent(actionLinkTarget.getAction(), invocation.getContext(), handler);

        ActionResponseGenerator result = holder.get();

        if (result == null)
        {
            Link link = _linkFactory.createPageLink(page);
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.