Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ResponseRenderer


        cycle.activate(page);
       
        reporter.reportRequestException(ErrorMessages.unableToProcessClientRequest(cause), cause);
        reporter.reportRequestException(ErrorMessages.unableToPresentExceptionPage(renderCause), renderCause);
       
        ResponseRenderer renderer = newRenderer(cycle, renderCause);
       
        replay();

        ExceptionPresenterImpl ep = new ExceptionPresenterImpl();
        ep.setExceptionPageName("Exception");
View Full Code Here


        IPage page = newPage();
        IRequestCycle cycle = newCycle("StaleSession", page);
       
        cycle.activate(page);

        ResponseRenderer renderer = newRenderer(cycle, null);
       
        replay();

        StaleSessionExceptionPresenterImpl presenter = new StaleSessionExceptionPresenterImpl();
View Full Code Here

    {
        IRequestCycle cycle = newCycle();
        IExternalPage page = (IExternalPage) newMock(IExternalPage.class);
        Object[] parameters = new Object[0];
        LinkFactory lf = newLinkFactory();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");

        trainGetPage(cycle, "ActivePage", page);

        trainExtractListenerParameters(lf, cycle, parameters);

        cycle.setListenerParameters(parameters);
        cycle.activate(page);

        page.activateExternalPage(parameters, cycle);

        rr.renderResponse(cycle);

        replayControls();

        ExternalService es = new ExternalService();
        es.setLinkFactory(lf);
View Full Code Here

    }

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        cycle.activate("TargetPage");

        rr.renderResponse(cycle);

        replayControls();

        PageService ps = new PageService();
        ps.setResponseRenderer(rr);
View Full Code Here

    public void testServiceSimple() throws Exception
    {
        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IAction action = newAction();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
        trainGetParameter(cycle, "action", "action-id");
        trainGetParameter(cycle, ServiceConstants.SESSION, null);

        trainGetPage(cycle, "ActivePage", page);

        cycle.activate(page);

        trainGetNestedComponent(page, "fred.barney", action);

        cycle.rewindPage("action-id", action);

        rr.renderResponse(cycle);

        replayControls();

        ActionService as = new ActionService();
        as.setResponseRenderer(rr);
View Full Code Here

        IRequestCycle cycle = newCycle();
        IPage page = newPage();
        IAction action = newAction();
        WebSession session = newWebSession(false);
        WebRequest request = newWebRequest(session);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, null);
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
        trainGetParameter(cycle, "action", "action-id");
        trainGetParameter(cycle, ServiceConstants.SESSION, "T");

        trainGetPage(cycle, "ActivePage", page);

        cycle.activate(page);

        trainGetNestedComponent(page, "fred.barney", action);

        trainGetRequiresSession(action, true);

        cycle.rewindPage("action-id", action);

        rr.renderResponse(cycle);

        replayControls();

        ActionService as = new ActionService();
        as.setResponseRenderer(rr);
View Full Code Here

    {
        IRequestCycle cycle = newCycle();
        IPage activePage = newPage();
        IPage componentPage = newPage();
        IAction action = newAction();
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.COMPONENT, "fred.barney");
        trainGetParameter(cycle, ServiceConstants.CONTAINER, "ComponentPage");
        trainGetParameter(cycle, ServiceConstants.PAGE, "ActivePage");
        trainGetParameter(cycle, "action", "action-id");
        trainGetParameter(cycle, ServiceConstants.SESSION, null);

        trainGetPage(cycle, "ActivePage", activePage);

        cycle.activate(activePage);

        trainGetPage(cycle, "ComponentPage", componentPage);

        trainGetNestedComponent(componentPage, "fred.barney", action);

        cycle.rewindPage("action-id", action);

        rr.renderResponse(cycle);

        replayControls();

        ActionService as = new ActionService();
        as.setResponseRenderer(rr);
View Full Code Here

    public void testService() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = (ResetEventHub) newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        hub.fireResetEvent();

        cycle.activate("TargetPage");

        rr.renderResponse(cycle);

        replayControls();

        ResetService rs = new ResetService();
        rs.setEnabled(true);
View Full Code Here

    public void testServiceNotEnabled() throws Exception
    {
        IRequestCycle cycle = newCycle();
        ResetEventHub hub = (ResetEventHub) newMock(ResetEventHub.class);
        ResponseRenderer rr = newResponseRenderer();

        trainGetParameter(cycle, ServiceConstants.PAGE, "TargetPage");

        cycle.activate("TargetPage");

        rr.renderResponse(cycle);

        replayControls();

        ResetService rs = new ResetService();
        rs.setEnabled(false);
View Full Code Here

    public void testIsActionRequest() throws Exception
    {
        IRequestCycle cycle = newCycle();
        PortletRequestGlobals globals = newRequestGlobals(false);
       
        ResponseRenderer renderer = newResponseRenderer();
       
        PortletPageResolver resolver = newResolver(cycle, "ZePage");
       
        cycle.activate("ZePage");
        renderer.renderResponse(cycle);

        replay();

        PortletHomeService phs = new PortletHomeService();
        phs.setResponseRenderer(renderer);
View Full Code Here

TOP

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

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.