info.magnolia.module.templating.paragraphs
Class JspParagraphRenderer

java.lang.Object
  extended by info.magnolia.module.templating.AbstractRenderer
      extended by info.magnolia.module.templating.paragraphs.AbstractParagraphRenderer
          extended by info.magnolia.module.templating.paragraphs.JspParagraphRenderer
All Implemented Interfaces:
ParagraphRenderer, RenderingModelBasedRenderer

public class JspParagraphRenderer
extends AbstractParagraphRenderer

A simple paragraph renderer which delegates to a jsp.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
JspParagraphRenderer()
           
 
Method Summary
protected  java.lang.String getPageAttributeName()
          Used to give JSP implementations to give the chance to use on other name than page which is a reserved name in JSPs.
protected  java.util.Map newContext()
          Create a new context object which is a map.
protected  void onRender(Content content, RenderableDefinition definition, java.io.Writer out, java.util.Map ctx, java.lang.String templatePath)
          Finally execute the rendering.
protected  Content wrapNodeForTemplate(Content currentContent, Content mainContent)
          We expose nodes as Map instances in JSPs.
 
Methods inherited from class info.magnolia.module.templating.paragraphs.AbstractParagraphRenderer
render
 
Methods inherited from class info.magnolia.module.templating.AbstractRenderer
determineTemplatePath, getAggregationStateSafely, getAggrigationStateSafely, getMagnoliaTemplatingUtilities, getMainContentSafely, newModel, render, restoreContext, saveAttribute, saveContextState, setContextAttribute, setupContext, wrapNodeForModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JspParagraphRenderer

public JspParagraphRenderer()
Method Detail

onRender

protected void onRender(Content content,
                        RenderableDefinition definition,
                        java.io.Writer out,
                        java.util.Map ctx,
                        java.lang.String templatePath)
                 throws RenderException
Description copied from class: AbstractRenderer
Finally execute the rendering.

Specified by:
onRender in class AbstractRenderer
Parameters:
content - TODO
Throws:
RenderException

newContext

protected java.util.Map newContext()
Description copied from class: AbstractRenderer
Create a new context object which is a map.

Specified by:
newContext in class AbstractRenderer

wrapNodeForTemplate

protected Content wrapNodeForTemplate(Content currentContent,
                                      Content mainContent)
We expose nodes as Map instances in JSPs.

Overrides:
wrapNodeForTemplate in class AbstractRenderer
Parameters:
currentContent - the actual content being exposed to the template
mainContent - the current "main content" or "page", which might be needed in certain wrapping situations
See Also:
TODO : return an Object instance instead - more flexibility for the template engine ?

getPageAttributeName

protected java.lang.String getPageAttributeName()
Description copied from class: AbstractRenderer
Used to give JSP implementations to give the chance to use on other name than page which is a reserved name in JSPs.

Overrides:
getPageAttributeName in class AbstractRenderer


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