info.magnolia.templating.renderers
Class NoScriptRenderer

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

public class NoScriptRenderer
extends AbstractRenderer

The renderer for definitions without template script. Renders ContentMaps from "components" or "component" attribute from contextObjects.


Field Summary
static String NO_SCRIPT_RENDERER
           
 
Fields inherited from class info.magnolia.rendering.renderer.AbstractRenderer
MODEL_ATTRIBUTE
 
Constructor Summary
NoScriptRenderer()
          Deprecated. since 4.5.10, use NoScriptRenderer(RenderingEngine)
NoScriptRenderer(RenderingEngine renderingEngine)
           
 
Method Summary
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.
 void render(RenderingContext renderingCtx, Map<String,Object> contextObjects)
          Called by RenderingEngine after it has setup the RenderingContext.
 
Methods inherited from class info.magnolia.rendering.renderer.AbstractRenderer
addContextAttribute, getAggregationStateSafely, getContextAttributes, getMainContentSafely, newModel, newModel, 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
 

Field Detail

NO_SCRIPT_RENDERER

public static final String NO_SCRIPT_RENDERER
See Also:
Constant Field Values
Constructor Detail

NoScriptRenderer

public NoScriptRenderer()
Deprecated. since 4.5.10, use NoScriptRenderer(RenderingEngine)


NoScriptRenderer

@Inject
public NoScriptRenderer(RenderingEngine renderingEngine)
Method Detail

render

public void render(RenderingContext renderingCtx,
                   Map<String,Object> contextObjects)
            throws RenderException
Description copied from interface: Renderer
Called by RenderingEngine after it has setup the RenderingContext.

Specified by:
render in interface Renderer
Overrides:
render in class AbstractRenderer
Parameters:
renderingCtx - rendering context prepared by the caller
contextObjects - objects to expose to the template script
Throws:
RenderException

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


Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.