org.springframework.extensions.webscripts
Class FreemarkerTagSupportDirective

java.lang.Object
  extended by org.springframework.extensions.webscripts.FreemarkerTagSupportDirective
All Implemented Interfaces:
freemarker.template.TemplateDirectiveModel, freemarker.template.TemplateModel
Direct Known Subclasses:
ComponentFreemarkerTagDirective, GenericFreemarkerTagDirective, RegionFreemarkerTagDirective, ResourceFreemarkerTagDirective

public abstract class FreemarkerTagSupportDirective
extends Object
implements freemarker.template.TemplateDirectiveModel

Abstract class that defines a Freemarker directive which can process JSP tags. This class exists so that freemarker directive implementations can be constructing using a single piece of code - a tag. The directives then provide another entry point into the same tag logic.

Author:
muzquiano

Field Summary
 
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
 
Constructor Summary
FreemarkerTagSupportDirective(RenderContext context)
          Instantiates a new freemarker tag support directive.
 
Method Summary
 String executeTag(javax.servlet.jsp.tagext.Tag tag)
          Execute a tag and return the String output
 String executeTag(javax.servlet.jsp.tagext.Tag tag, String bodyContent)
          Execute tag.
protected  String getStringParameter(Map params, String parameterName)
          Gets the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface freemarker.template.TemplateDirectiveModel
execute
 

Constructor Detail

FreemarkerTagSupportDirective

public FreemarkerTagSupportDirective(RenderContext context)
Instantiates a new freemarker tag support directive.

Parameters:
context - the context
Method Detail

executeTag

public final String executeTag(javax.servlet.jsp.tagext.Tag tag)
                        throws TagExecutionException
Execute a tag and return the String output

Parameters:
tag - the tag
Returns:
the string
Throws:
TagExecutionException

executeTag

public final String executeTag(javax.servlet.jsp.tagext.Tag tag,
                               String bodyContent)
                        throws TagExecutionException
Execute tag.

Parameters:
tag - the tag
bodyContent - the body content
Returns:
the string
Throws:
TagExecutionException

getStringParameter

protected String getStringParameter(Map params,
                                    String parameterName)
                             throws freemarker.template.TemplateModelException
Gets the parameter.

Parameters:
params - the params
parameterName - the parameter name
Returns:
the parameter
Throws:
freemarker.template.TemplateModelException - the template model exception


Copyright © 2009 SpringSource, Inc. All Rights Reserved.