Package info.magnolia.rendering.context

Examples of info.magnolia.rendering.context.RenderingContext


        }else {
            throw new TemplateProcessingException("Cannot cast "+contentObject.getClass()+" to javax.jcr.Node");
        }

        final RenderingEngine renderingEngine = Components.getComponent(RenderingEngine.class);
        final RenderingContext renderingContext = renderingEngine.getRenderingContext();

        ComponentElement componentElement = createElement(renderingContext);
        componentElement.setContent(content);
        processElement(element, attributeName, componentElement);
View Full Code Here


                    arguments, "${renderingContext}");
            if(!(ctxObj instanceof RenderingContext)){
                throw new TemplateProcessingException("Musst pass a RenderingContext here");
            }

            RenderingContext renderingContext = (RenderingContext)ctxObj;
            TemplateDefinition templateDefinition = (TemplateDefinition)renderingContext.getRenderableDefinition();
            String dlg = templateDefinition.getDialog();
            if(dlg!=null){
                helper.attribute("dialog", dlg);
            }
            helper.attribute("preview", String.valueOf(MgnlContext.getAggregationState().isPreviewMode()));
View Full Code Here

    public final ProcessorResult processAttribute(final Arguments arguments, final Element element, final String attributeName) {

        final String attributeValue = element.getAttributeValue(attributeName);

        final RenderingEngine renderingEngine = Components.getComponent(RenderingEngine.class);
        final RenderingContext renderingContext = renderingEngine.getRenderingContext();

        AreaDefinition areaDef = null;
        BlossomTemplateDefinition templateDefinition;
        try {

            templateDefinition = (BlossomTemplateDefinition) renderingContext.getRenderableDefinition();
            if (templateDefinition.getAreas().containsKey(attributeValue)) {
                areaDef = templateDefinition.getAreas().get(attributeValue);
            }

        } catch (ClassCastException x) {
View Full Code Here

TOP

Related Classes of info.magnolia.rendering.context.RenderingContext

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.