blob: 2a059e0d8b8ef4e7810ffa320d3a7147c6768cc1 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_02) on Mon Feb 05 10:30:42 PST 2007 -->
<TITLE>
RenderTool (VelocityTools 1.3 Documentation)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.velocity.tools.generic.RenderTool class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="RenderTool (VelocityTools 1.3 Documentation)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/generic/NumberTool.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/generic/ResourceTool.html" title="class in org.apache.velocity.tools.generic"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/velocity/tools/generic/RenderTool.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="RenderTool.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.velocity.tools.generic</FONT>
<BR>
Class RenderTool</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.velocity.tools.generic.RenderTool</B>
</PRE>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../org/apache/velocity/tools/view/tools/ViewRenderTool.html" title="class in org.apache.velocity.tools.view.tools">ViewRenderTool</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>RenderTool</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
This tool exposes methods to evaluate the given
strings as VTL (Velocity Template Language)
using the given context.
<p>
NOTE: These examples assume you have placed an
instance of the current context within itself
as 'ctx'. And, of course, the RenderTool is
assumed to be available as 'render'.
</p>
<pre>
Example of eval():
Input
-----
#set( $list = [1,2,3] )
#set( $object = '$list' )
#set( $method = 'size()' )
$render.eval($ctx, "${object}.$method")
Output
------
3
Example of recurse():
Input
-----
#macro( say_hi )hello world!#end
#set( $foo = '#say_hi()' )
#set( $bar = '$foo' )
$render.recurse($ctx, $bar)
Output
------
hello world!
Toolbox configuration:
&lt;tool&gt;
&lt;key&gt;render&lt;/key&gt;
&lt;class&gt;org.apache.velocity.tools.generic.RenderTool&lt;/class&gt;
&lt;/tool&gt;
</pre>
<p>Ok, so these examples are really lame. But, it seems like
someone out there is always asking how to do stuff like this
and we always tell them to write a tool. Now we can just tell
them to use this tool.</p>
<p>This tool is safe (and optimized) for use in the application
scope of a servlet environment.</p>
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision: 484711 $ $Date: 2006-12-08 11:41:50 -0800 (Fri, 08 Dec 2006) $</DD>
<DT><B>Author:</B></DT>
<DD>Nathan Bubna</DD>
</DL>
<HR>
<P>
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#catchExceptions">catchExceptions</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#DEFAULT_PARSE_DEPTH">DEFAULT_PARSE_DEPTH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The maximum number of loops allowed when recursing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;org.apache.velocity.app.VelocityEngine</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#engine">engine</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#KEY_CATCH_EXCEPTIONS">KEY_CATCH_EXCEPTIONS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#KEY_PARSE_DEPTH">KEY_PARSE_DEPTH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private static&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#LOG_TAG">LOG_TAG</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#parseDepth">parseDepth</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#RenderTool()">RenderTool</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#configure(java.util.Map)">configure</A></B>(java.util.Map&nbsp;params)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Looks for parse depth and catch.exceptions parameters.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#eval(org.apache.velocity.context.Context, java.lang.String)">eval</A></B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Evaluates a String containing VTL using the current context,
and returns the result as a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#getCatchExceptions()">getCatchExceptions</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns <code>true</code> if this render() and eval() methods will
catch exceptions thrown during rendering.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#getParseDepth()">getParseDepth</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the maximum number of loops allowed when recursing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>private &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#internalEval(org.apache.velocity.context.Context, java.lang.String)">internalEval</A></B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#internalRecurse(org.apache.velocity.context.Context, java.lang.String, int)">internalRecurse</A></B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl,
int&nbsp;count)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#recurse(org.apache.velocity.context.Context, java.lang.String)">recurse</A></B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Recursively evaluates a String containing VTL using the
current context, and returns the result as a String.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#setCatchExceptions(boolean)">setCatchExceptions</A></B>(boolean&nbsp;catchExceptions)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether or not the render() and eval() methods should catch
exceptions during their execution or not.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#setParseDepth(int)">setParseDepth</A></B>(int&nbsp;depth)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the maximum number of loops allowed when recursing.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#setVelocityEngine(org.apache.velocity.app.VelocityEngine)">setVelocityEngine</A></B>(org.apache.velocity.app.VelocityEngine&nbsp;ve)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow user to specify a VelocityEngine to be used
in place of the Velocity singleton.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="DEFAULT_PARSE_DEPTH"><!-- --></A><H3>
DEFAULT_PARSE_DEPTH</H3>
<PRE>
public static final int <B>DEFAULT_PARSE_DEPTH</B></PRE>
<DL>
<DD>The maximum number of loops allowed when recursing.
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.2</DD>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.RenderTool.DEFAULT_PARSE_DEPTH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="KEY_PARSE_DEPTH"><!-- --></A><H3>
KEY_PARSE_DEPTH</H3>
<PRE>
public static final java.lang.String <B>KEY_PARSE_DEPTH</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.RenderTool.KEY_PARSE_DEPTH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="KEY_CATCH_EXCEPTIONS"><!-- --></A><H3>
KEY_CATCH_EXCEPTIONS</H3>
<PRE>
public static final java.lang.String <B>KEY_CATCH_EXCEPTIONS</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.RenderTool.KEY_CATCH_EXCEPTIONS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="LOG_TAG"><!-- --></A><H3>
LOG_TAG</H3>
<PRE>
private static final java.lang.String <B>LOG_TAG</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.velocity.tools.generic.RenderTool.LOG_TAG">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="engine"><!-- --></A><H3>
engine</H3>
<PRE>
private org.apache.velocity.app.VelocityEngine <B>engine</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="parseDepth"><!-- --></A><H3>
parseDepth</H3>
<PRE>
private int <B>parseDepth</B></PRE>
<DL>
<DL>
</DL>
</DL>
<HR>
<A NAME="catchExceptions"><!-- --></A><H3>
catchExceptions</H3>
<PRE>
private boolean <B>catchExceptions</B></PRE>
<DL>
<DL>
</DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="RenderTool()"><!-- --></A><H3>
RenderTool</H3>
<PRE>
public <B>RenderTool</B>()</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="configure(java.util.Map)"><!-- --></A><H3>
configure</H3>
<PRE>
public void <B>configure</B>(java.util.Map&nbsp;params)</PRE>
<DL>
<DD>Looks for parse depth and catch.exceptions parameters.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.3</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setVelocityEngine(org.apache.velocity.app.VelocityEngine)"><!-- --></A><H3>
setVelocityEngine</H3>
<PRE>
public void <B>setVelocityEngine</B>(org.apache.velocity.app.VelocityEngine&nbsp;ve)</PRE>
<DL>
<DD>Allow user to specify a VelocityEngine to be used
in place of the Velocity singleton.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setParseDepth(int)"><!-- --></A><H3>
setParseDepth</H3>
<PRE>
public void <B>setParseDepth</B>(int&nbsp;depth)</PRE>
<DL>
<DD>Set the maximum number of loops allowed when recursing.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getParseDepth()"><!-- --></A><H3>
getParseDepth</H3>
<PRE>
public int <B>getParseDepth</B>()</PRE>
<DL>
<DD>Get the maximum number of loops allowed when recursing.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.2</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="setCatchExceptions(boolean)"><!-- --></A><H3>
setCatchExceptions</H3>
<PRE>
public void <B>setCatchExceptions</B>(boolean&nbsp;catchExceptions)</PRE>
<DL>
<DD>Sets whether or not the render() and eval() methods should catch
exceptions during their execution or not.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.3</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="getCatchExceptions()"><!-- --></A><H3>
getCatchExceptions</H3>
<PRE>
public boolean <B>getCatchExceptions</B>()</PRE>
<DL>
<DD>Returns <code>true</code> if this render() and eval() methods will
catch exceptions thrown during rendering.
<P>
<DD><DL>
<DT><B>Since:</B></DT>
<DD>VelocityTools 1.3</DD>
</DL>
</DD>
</DL>
<HR>
<A NAME="eval(org.apache.velocity.context.Context, java.lang.String)"><!-- --></A><H3>
eval</H3>
<PRE>
public java.lang.String <B>eval</B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)
throws java.lang.Exception</PRE>
<DL>
<DD><p>Evaluates a String containing VTL using the current context,
and returns the result as a String. By default if this fails, then
<code>null</code> will be returned, though this tool can be configured
to let Exceptions pass through. This evaluation is not recursive.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ctx</CODE> - the current Context<DD><CODE>vtl</CODE> - the code to be evaluated
<DT><B>Returns:</B><DD>the evaluated code as a String
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="internalEval(org.apache.velocity.context.Context, java.lang.String)"><!-- --></A><H3>
internalEval</H3>
<PRE>
private java.lang.String <B>internalEval</B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)
throws java.lang.Exception</PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="recurse(org.apache.velocity.context.Context, java.lang.String)"><!-- --></A><H3>
recurse</H3>
<PRE>
public java.lang.String <B>recurse</B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl)
throws java.lang.Exception</PRE>
<DL>
<DD><p>Recursively evaluates a String containing VTL using the
current context, and returns the result as a String. It
will continue to re-evaluate the output of the last
evaluation until an evaluation returns the same code
that was fed into it or the number of recursive loops
exceeds the set parse depth.</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>ctx</CODE> - the current Context<DD><CODE>vtl</CODE> - the code to be evaluated
<DT><B>Returns:</B><DD>the evaluated code as a String
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
</DL>
<HR>
<A NAME="internalRecurse(org.apache.velocity.context.Context, java.lang.String, int)"><!-- --></A><H3>
internalRecurse</H3>
<PRE>
protected java.lang.String <B>internalRecurse</B>(org.apache.velocity.context.Context&nbsp;ctx,
java.lang.String&nbsp;vtl,
int&nbsp;count)
throws java.lang.Exception</PRE>
<DL>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.Exception</CODE></DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/generic/NumberTool.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../org/apache/velocity/tools/generic/ResourceTool.html" title="class in org.apache.velocity.tools.generic"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?org/apache/velocity/tools/generic/RenderTool.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="RenderTool.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
Copyright (c) 2003-2007 Apache Software Foundation
</BODY>
</HTML>