org.tigris.scarab.util
Class SnippetRenderer

java.lang.Object
  extended byorg.tigris.scarab.util.SnippetRenderer
All Implemented Interfaces:
SkipFiltering

public class SnippetRenderer
extends java.lang.Object
implements SkipFiltering

Renders templates in the templates/snippets directory. Its primary use is within actions, if the messaging is more complex than a simple string. One cannot use the renderer that might be in the context as that renderer could output directly to the response, while the action message should not be sent until a later time.

Author:
John McNally

Constructor Summary
SnippetRenderer(org.apache.turbine.RunData data, java.lang.String template)
          Construct a renderer for the given RunData.
 
Method Summary
 java.lang.String toString()
          Render the given template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnippetRenderer

public SnippetRenderer(org.apache.turbine.RunData data,
                       java.lang.String template)
Construct a renderer for the given RunData.

Method Detail

toString

public java.lang.String toString()
Render the given template. TemplateContext to use will be extracted from the RunData with which this SnippetRenderer was constructer.

Specified by:
toString in interface SkipFiltering
Returns:
Result of template merge


Copyright © 2000-2004 Tigris.org. All Rights Reserved.