Package org.apache.tiles

Examples of org.apache.tiles.TilesContainer.endContext()


        TilesContainer container = createMock(TilesContainer.class);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(request.getAttribute(ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME))
                .andReturn(container);
        container.endContext(velocityContext, request, response);

        replay(velocityContext, request, response, servletContext, container, attributeContext);
        initializeTool();
        tool.endAttributeContext();
        verify(velocityContext, request, response, servletContext, container, attributeContext);
View Full Code Here


     * @since 2.2.0
     */
    public VelocityStyleTilesTool endAttributeContext() {
        TilesContainer container = ServletUtil.getCurrentContainer(
                getRequest(), getServletContext());
        container.endContext(getVelocityContext(), getRequest(),
                getResponse());
        return this;
    }

    /**
 
View Full Code Here

        TilesContainer container = createMock(TilesContainer.class);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(request.getAttribute(ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME))
                .andReturn(container);
        container.endContext(velocityContext, request, response);

        replay(velocityContext, request, response, servletContext, container, attributeContext);
        initializeTool();
        tool.endAttributeContext();
        verify(velocityContext, request, response, servletContext, container, attributeContext);
View Full Code Here

        TilesContainer container = createMock(TilesContainer.class);
        Integer requestItem = new Integer(1);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(container.getAttributeContext(requestItem)).andReturn(attributeContext);
        container.endContext(requestItem);
        attributeContext.setPreparer("myPreparer");
        attributeContext.setTemplateAttribute((Attribute) notNull());
        container.renderContext(requestItem);

        replay(container, attributeContext);
View Full Code Here

        Integer requestItem = new Integer(1);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(container.startContext(requestItem)).andReturn(attributeContext);
        expect(container.getAttributeContext(requestItem)).andReturn(attributeContext);
        container.endContext(requestItem);
        attributeContext.setPreparer("myPreparer");
        attributeContext.setTemplateAttribute((Attribute) notNull());
        container.renderContext(requestItem);

        replay(container, attributeContext);
View Full Code Here

        Attribute attribute = new Attribute("myValue");
        composeStack.push(attribute);
        TilesContainer container = createMock(TilesContainer.class);
        Integer requestItem = new Integer(1);

        container.endContext(requestItem);
        container.render(attribute, requestItem);

        replay(resolver, container);
        model.end(composeStack, container, false, requestItem);
        verify(resolver, container);
View Full Code Here

        container.prepare("myPreparer", requestItem);
        expect(resolver.computeAttribute(container, attribute, "myName", "myRole", false, "myDefaultValue",
                "myDefaultValueRole", "myDefaultValueType", requestItem)).andReturn(attribute);
        expect(container.startContext(requestItem)).andReturn(attributeContext);
        container.endContext(requestItem);
        container.render(attribute, requestItem);

        replay(resolver, container);
        model.execute(container, false, "myPreparer", "myRole", "myDefaultValue",
                "myDefaultValueRole", "myDefaultValueType", "myName", attribute, requestItem);
View Full Code Here

        TilesContainer container = createMock(TilesContainer.class);
        Integer requestItem = new Integer(1);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(container.getAttributeContext(requestItem)).andReturn(attributeContext);
        container.endContext(requestItem);
        attributeContext.setPreparer("myPreparer");
        attributeContext.setTemplateAttribute((Attribute) notNull());
        container.render("myDefinitionName", requestItem);

        replay(container, attributeContext);
View Full Code Here

        Integer requestItem = new Integer(1);
        AttributeContext attributeContext = createMock(AttributeContext.class);

        expect(container.startContext(requestItem)).andReturn(attributeContext);
        expect(container.getAttributeContext(requestItem)).andReturn(attributeContext);
        container.endContext(requestItem);
        attributeContext.setPreparer("myPreparer");
        attributeContext.setTemplateAttribute((Attribute) notNull());
        container.render("myDefinitionName", requestItem);

        replay(container, attributeContext);
View Full Code Here

        TilesContainer container = createMock(TilesContainer.class);
        Integer requestItem = new Integer(1);
        Writer writer = createMock(Writer.class);

        writer.write("myValue");
        container.endContext(requestItem);

        replay(resolver, container, writer);
        model.end(composeStack, container, writer, false, requestItem);
        verify(resolver, container, writer);
    }
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.