Package org.apache.tiles

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


        expect(pageContext.getAttribute(
                ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
                PageContext.REQUEST_SCOPE)).andReturn(container);
        expect(container.getAttributeContext(pageContext)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("attributeName")).andReturn(attribute);
        expect(container.evaluate(attribute, pageContext)).andReturn(null);

        replay(pageContext, container, attributeContext);
        ImportAttributeTag tag = new ImportAttributeTag();
        tag.setPageContext(pageContext);
        tag.setName("attributeName");
View Full Code Here


        expect(pageContext.getAttribute(
                ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
                PageContext.REQUEST_SCOPE)).andReturn(container);
        expect(container.getAttributeContext(pageContext)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("attributeName")).andReturn(attribute);
        expect(container.evaluate(attribute, pageContext)).andReturn(null);

        replay(pageContext, container, attributeContext);
        ImportAttributeTag tag = new ImportAttributeTag();
        tag.setPageContext(pageContext);
        tag.setName("attributeName");
View Full Code Here

        expect(pageContext.getAttribute(
                ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
                PageContext.REQUEST_SCOPE)).andReturn(container);
        expect(container.getAttributeContext(pageContext)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("attributeName")).andReturn(attribute);
        expect(container.evaluate(attribute, pageContext)).andReturn(null);
        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
        Set<String> names = new HashSet<String>();
        names.add("attributeName");
        expect(attributeContext.getLocalAttributeNames()).andReturn(names);
View Full Code Here

        expect(pageContext.getAttribute(
                ServletUtil.CURRENT_CONTAINER_ATTRIBUTE_NAME,
                PageContext.REQUEST_SCOPE)).andReturn(container);
        expect(container.getAttributeContext(pageContext)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("attributeName")).andReturn(attribute);
        expect(container.evaluate(attribute, pageContext)).andReturn(null);
        expect(attributeContext.getCascadedAttributeNames()).andReturn(null);
        Set<String> names = new HashSet<String>();
        names.add("attributeName");
        expect(attributeContext.getLocalAttributeNames()).andReturn(names);
View Full Code Here

        expect(pageContext.getRequest()).andReturn(httpServletRequest);
        expect(pageContext.getResponse()).andReturn(httpServletResponse);
        expect(pageContext.getAttribute(TilesAccess.CURRENT_CONTAINER_ATTRIBUTE_NAME, PageContext.REQUEST_SCOPE)).andReturn(container);
        expect(container.getAttributeContext(isA(JspRequest.class))).andReturn(attributeContext);
        expect(attributeContext.getAttribute("name")).andReturn(attribute);
        expect(container.evaluate(isA(Attribute.class), isA(JspRequest.class))).andReturn(new Integer(1));
        pageContext.setAttribute("id", new Integer(1), PageContext.PAGE_SCOPE);
        replay(jspBody, pageContext, parent,
               applicationContext, httpServletRequest, httpServletResponse,
               applicationScope, container, attributeContext, attribute);
        tag.setName("name");
View Full Code Here

        expect(request.getApplicationContext()).andReturn(applicationContext);
        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
        expect(container.getAttributeContext(request)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
        expect(container.evaluate(attribute, request)).andReturn("myEvaluatedValue");

        replay(container, attributeContext, request, applicationContext);
        model.execute("myName", "request", null, false, request);
        Map<String, Object> attributes = requestScope;
        assertEquals(2, attributes.size());
View Full Code Here

        expect(request.getApplicationContext()).andReturn(applicationContext);
        expect(request.getContext("request")).andReturn(requestScope).anyTimes();
        expect(container.getAttributeContext(request)).andReturn(attributeContext);
        expect(attributeContext.getAttribute("myName")).andReturn(attribute);
        expect(container.evaluate(attribute, request)).andReturn("myEvaluatedValue");

        replay(container, attributeContext, request, applicationContext);
        model.execute("myName", "request", "myToName", false, request);
        Map<String, Object> attributes = requestScope;
        assertEquals(2, attributes.size());
View Full Code Here

        expect(attributeContext.getCascadedAttributeNames()).andReturn(cascadedNames);
        expect(attributeContext.getLocalAttributeNames()).andReturn(localNames);
        expect(attributeContext.getAttribute("myName1")).andReturn(attribute1).times(2);
        expect(attributeContext.getAttribute("myName2")).andReturn(attribute2);
        expect(attributeContext.getAttribute("myName3")).andReturn(attribute3);
        expect(container.evaluate(attribute1, request)).andReturn("myEvaluatedValue1").times(2);
        expect(container.evaluate(attribute2, request)).andReturn("myEvaluatedValue2");
        expect(container.evaluate(attribute3, request)).andReturn("myEvaluatedValue3");

        replay(container, attributeContext, request, applicationContext);
        model.execute(null, "request", null, false, request);
View Full Code Here

        expect(attributeContext.getLocalAttributeNames()).andReturn(localNames);
        expect(attributeContext.getAttribute("myName1")).andReturn(attribute1).times(2);
        expect(attributeContext.getAttribute("myName2")).andReturn(attribute2);
        expect(attributeContext.getAttribute("myName3")).andReturn(attribute3);
        expect(container.evaluate(attribute1, request)).andReturn("myEvaluatedValue1").times(2);
        expect(container.evaluate(attribute2, request)).andReturn("myEvaluatedValue2");
        expect(container.evaluate(attribute3, request)).andReturn("myEvaluatedValue3");

        replay(container, attributeContext, request, applicationContext);
        model.execute(null, "request", null, false, request);
        Map<String, Object> attributes = requestScope;
View Full Code Here

        expect(attributeContext.getAttribute("myName1")).andReturn(attribute1).times(2);
        expect(attributeContext.getAttribute("myName2")).andReturn(attribute2);
        expect(attributeContext.getAttribute("myName3")).andReturn(attribute3);
        expect(container.evaluate(attribute1, request)).andReturn("myEvaluatedValue1").times(2);
        expect(container.evaluate(attribute2, request)).andReturn("myEvaluatedValue2");
        expect(container.evaluate(attribute3, request)).andReturn("myEvaluatedValue3");

        replay(container, attributeContext, request, applicationContext);
        model.execute(null, "request", null, false, request);
        Map<String, Object> attributes = requestScope;
        assertEquals(ATTRIBUTES_SIZE, attributes.size());
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.