org.apache.commons.jelly.tags.velocity
Class MergeTag
java.lang.Object
|
+--org.apache.commons.jelly.TagSupport
|
+--org.apache.commons.jelly.tags.velocity.VelocityTagSupport
|
+--org.apache.commons.jelly.tags.velocity.MergeTag
- All Implemented Interfaces:
- org.apache.commons.jelly.Tag
- public class MergeTag
- extends VelocityTagSupport
A tag that uses Velocity to render a specified template with the
JellyContext storing the results in either a variable in the
JellyContext or in a specified file.
- Version:
- $Id: MergeTag.java,v 1.4 2004/09/09 12:23:16 dion Exp $
- Author:
- Pete Kazmier
Fields inherited from class org.apache.commons.jelly.TagSupport |
body, context, hasTrimmed, parent, shouldTrim |
Method Summary |
void |
doTag(org.apache.commons.jelly.XMLOutput output)
|
void |
setBasedir(java.lang.String basedir)
Sets the base directory used for loading of templates by the
Velocity file resource loader. |
void |
setInputEncoding(java.lang.String encoding)
Sets the input encoding used in the specified template which
defaults to ISO-8859-1. |
void |
setName(java.lang.String name)
Sets the file name for the merged output. |
void |
setOutputEncoding(java.lang.String encoding)
Sets the output encoding mode which defaults to ISO-8859-1 used
when storing the results of a merge in a file. |
void |
setReadOnly(boolean readOnly)
Sets the read-only flag for this adapter which prevents
modifications in the Velocity context from propogating to the
JellyContext. |
void |
setTemplate(java.lang.String template)
Sets the filename of the template used to merge with the
JellyContext. |
void |
setVar(java.lang.String var)
Sets the var used to store the results of the merge. |
Methods inherited from class org.apache.commons.jelly.TagSupport |
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isEscapeText, isTrim, setBody, setContext, setEscapeText, setParent, setTrim, trimBody |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MergeTag
public MergeTag()
doTag
public void doTag(org.apache.commons.jelly.XMLOutput output)
throws org.apache.commons.jelly.JellyTagException
- Overrides:
doTag
in class org.apache.commons.jelly.TagSupport
setVar
public void setVar(java.lang.String var)
- Sets the var used to store the results of the merge.
- Parameters:
var
- The var to set in the JellyContext with the results of
the merge.
setName
public void setName(java.lang.String name)
- Sets the file name for the merged output.
- Parameters:
name
- The name of the output file that is used to store the
results of the merge.
setBasedir
public void setBasedir(java.lang.String basedir)
- Sets the base directory used for loading of templates by the
Velocity file resource loader.
- Parameters:
basedir
- The directory where templates can be located by
the Velocity file resource loader.
setTemplate
public void setTemplate(java.lang.String template)
- Sets the filename of the template used to merge with the
JellyContext.
- Parameters:
template
- The filename of the template to be merged.
setReadOnly
public void setReadOnly(boolean readOnly)
- Sets the read-only flag for this adapter which prevents
modifications in the Velocity context from propogating to the
JellyContext.
- Parameters:
readOnly
- true prevents modifications from
propogating (the default), or false which permits
modifications.
setOutputEncoding
public void setOutputEncoding(java.lang.String encoding)
- Sets the output encoding mode which defaults to ISO-8859-1 used
when storing the results of a merge in a file.
- Parameters:
encoding
- The file encoding to use when writing the
output.
setInputEncoding
public void setInputEncoding(java.lang.String encoding)
- Sets the input encoding used in the specified template which
defaults to ISO-8859-1.
- Parameters:
encoding
- The encoding used in the template.
Copyright © 2002-2004 Apache Software Foundation. All Rights Reserved.