Package org.apache.tiles

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


        session.setAttribute(DefaultLocaleResolver.LOCALE_KEY, locale);
        ServletUtil.setCurrentContainer(request, request
                .getSession().getServletContext(), containerKey);
        TilesContainer container = ServletUtil.getCurrentContainer(request, request
                .getSession().getServletContext());
        container.render("test.localized.definition", request, response);
    }
}
View Full Code Here


            portletSession.removeAttribute("definition");
            TilesContainer container = PortletUtil.getCurrentContainer(request,
                    getPortletContext());
            if (container.isValidDefinition(definition, request, response,
                    getPortletContext())) {
                container.render(definition, request, response,
                        getPortletContext());
                addBackLink(response);
            } else {
                PortletRequestDispatcher dispatcher = getPortletContext()
                        .getRequestDispatcher(
View Full Code Here

                .createMock(TilesRequestContext.class);
        Object[] requestObjects = new Object[0];
        EasyMock.expect(requestContext.getRequestObjects()).andReturn(requestObjects);
        EasyMock.expect(contextFactory.createRequestContext(applicationContext))
                .andReturn(requestContext);
        container.render("my.definition");
        EasyMock.replay(applicationContext, contextFactory, requestContext,
                container);
        renderer.setApplicationContext(applicationContext);
        renderer.setRequestContextFactory(contextFactory);
        renderer.setContainer(container);
View Full Code Here

                .andReturn(requestContext);
        Object[] requestObjects = new Object[0];
        EasyMock.expect(requestContext.getRequestObjects()).andReturn(requestObjects);
        EasyMock.expect(container.isValidDefinition("my.definition"))
                .andReturn(Boolean.TRUE);
        container.render("my.definition");
        EasyMock.replay(applicationContext, contextFactory, requestContext,
                container);
        renderer.setApplicationContext(applicationContext);
        renderer.setRequestContextFactory(contextFactory);
        renderer.setContainer(container);
View Full Code Here

        mutator.mutate(container.getAttributeContext(req, res), req);
        if (preventDecorationToken != null) {
            req.setAttribute(preventDecorationToken, Boolean.TRUE);
        }
        String definitionName = getDefinitionForRequest(req);
        container.render(definitionName, req, res);
    }

    /**
     * Returns the final definition to render for the given request.
     *
 
View Full Code Here

        mutator.mutate(container.getAttributeContext(req, res), req);
        String definition = getDefinitionName(req);
        if (log.isDebugEnabled()) {
            log.info("Dispatching to tile '" + definition + "'");
        }
        container.render(definition, req, res);
    }

    /**
     * Returns the called definition name for the given request.
     *
 
View Full Code Here

        mutator.mutate(container.getAttributeContext(req, res), req);
        String definition = getDefinitionName(req);
        if (LOG.isDebugEnabled()) {
            LOG.info("Dispatching to tile '" + definition + "'");
        }
        container.render(definition, req, res);
    }

    /**
     * Returns the called definition name for the given request.
     *
 
View Full Code Here

        mutator.mutate(container.getAttributeContext(req, res), req);
        if (preventDecorationToken != null) {
            req.setAttribute(preventDecorationToken, Boolean.TRUE);
        }
        String definitionName = getDefinitionForRequest(req);
        container.render(definitionName, req, res);
    }

    /**
     * Returns the final definition to render for the given request.
     *
 
View Full Code Here

        TilesContainer container = EasyMock.createMock(TilesContainer.class);
        TilesRequestContext requestContext = EasyMock
                .createMock(TilesRequestContext.class);
        EasyMock.expect(contextFactory.createRequestContext(applicationContext))
                .andReturn(requestContext);
        container.render("my.definition");
        EasyMock.replay(applicationContext, contextFactory, requestContext,
                container);
        renderer.setApplicationContext(applicationContext);
        renderer.setContextFactory(contextFactory);
        renderer.setContainer(container);
View Full Code Here

                .createMock(TilesRequestContext.class);
        EasyMock.expect(contextFactory.createRequestContext(applicationContext))
                .andReturn(requestContext);
        EasyMock.expect(container.isValidDefinition("my.definition"))
                .andReturn(Boolean.TRUE);
        container.render("my.definition");
        EasyMock.replay(applicationContext, contextFactory, requestContext,
                container);
        renderer.setApplicationContext(applicationContext);
        renderer.setContextFactory(contextFactory);
        renderer.setContainer(container);
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.