info.magnolia.rendering.renderer
Class FreemarkerRenderer

java.lang.Object
  extended by info.magnolia.rendering.renderer.AbstractRenderer
      extended by info.magnolia.rendering.renderer.FreemarkerRenderer
All Implemented Interfaces:
Renderer, RenderingModelBasedRenderer

public class FreemarkerRenderer
extends AbstractRenderer

Uses FreeMarker to render the content.


Field Summary
 
Fields inherited from class info.magnolia.rendering.renderer.AbstractRenderer
MODEL_ATTRIBUTE
 
Constructor Summary
FreemarkerRenderer()
          Deprecated. since 5.0.2, use FreemarkerRenderer(FreemarkerHelper, RenderingEngine)
FreemarkerRenderer(info.magnolia.freemarker.FreemarkerHelper fmRenderer, RenderingEngine renderingEngine)
           
 
Method Summary
 info.magnolia.freemarker.FreemarkerHelper getFmHelper()
           
protected  Map<String,Object> newContext()
          Create a new context object which is a map.
protected  void onRender(javax.jcr.Node content, RenderableDefinition definition, RenderingContext renderingCtx, Map<String,Object> ctx, String templateScript)
          Finally execute the rendering.
 
Methods inherited from class info.magnolia.rendering.renderer.AbstractRenderer
addContextAttribute, getAggregationStateSafely, getContextAttributes, getMainContentSafely, newModel, newModel, render, resolveTemplateScript, restoreContext, saveAttribute, saveContextState, setContextAttribute, setContextAttributes, setupContext, wrapNodeForModel, wrapNodeForTemplate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FreemarkerRenderer

public FreemarkerRenderer()
Deprecated. since 5.0.2, use FreemarkerRenderer(FreemarkerHelper, RenderingEngine)

Constructs a FreemarkerTemplateRenderer that uses the default (singleton) instance of FreemarkerHelper.


FreemarkerRenderer

@Inject
public FreemarkerRenderer(info.magnolia.freemarker.FreemarkerHelper fmRenderer,
                                 RenderingEngine renderingEngine)
Method Detail

onRender

protected void onRender(javax.jcr.Node content,
                        RenderableDefinition definition,
                        RenderingContext renderingCtx,
                        Map<String,Object> ctx,
                        String templateScript)
                 throws RenderException
Description copied from class: AbstractRenderer
Finally execute the rendering.

Specified by:
onRender in class AbstractRenderer
Throws:
RenderException

newContext

protected Map<String,Object> newContext()
Description copied from class: AbstractRenderer
Create a new context object which is a map.

Specified by:
newContext in class AbstractRenderer

getFmHelper

public info.magnolia.freemarker.FreemarkerHelper getFmHelper()


Copyright © 2003-2014 Magnolia International Ltd.. All Rights Reserved.