<!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> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/NumberTool.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A> | |
<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> | |
<A HREF="RenderTool.html" target="_top"><B>NO FRAMES</B></A> | |
<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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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: | |
<tool> | |
<key>render</key> | |
<class>org.apache.velocity.tools.generic.RenderTool</class> | |
</tool> | |
</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 boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#catchExceptions">catchExceptions</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static 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> | |
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 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> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static 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> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>static 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> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private static 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> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>private int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#parseDepth">parseDepth</A></B></CODE> | |
<BR> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ======== 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> | |
</TD> | |
</TR> | |
</TABLE> | |
| |
<!-- ========== 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> 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 params)</CODE> | |
<BR> | |
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> 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 ctx, | |
java.lang.String vtl)</CODE> | |
<BR> | |
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> boolean</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#getCatchExceptions()">getCatchExceptions</A></B>()</CODE> | |
<BR> | |
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> int</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#getParseDepth()">getParseDepth</A></B>()</CODE> | |
<BR> | |
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 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 ctx, | |
java.lang.String vtl)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE>protected 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 ctx, | |
java.lang.String vtl, | |
int count)</CODE> | |
<BR> | |
</TD> | |
</TR> | |
<TR BGCOLOR="white" CLASS="TableRowColor"> | |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> | |
<CODE> 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 ctx, | |
java.lang.String vtl)</CODE> | |
<BR> | |
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> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#setCatchExceptions(boolean)">setCatchExceptions</A></B>(boolean catchExceptions)</CODE> | |
<BR> | |
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> void</CODE></FONT></TD> | |
<TD><CODE><B><A HREF="../../../../../org/apache/velocity/tools/generic/RenderTool.html#setParseDepth(int)">setParseDepth</A></B>(int depth)</CODE> | |
<BR> | |
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> 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 ve)</CODE> | |
<BR> | |
Allow user to specify a VelocityEngine to be used | |
in place of the Velocity singleton.</TD> | |
</TR> | |
</TABLE> | |
<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> | |
| |
<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 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 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 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 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 ctx, | |
java.lang.String 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 ctx, | |
java.lang.String 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 ctx, | |
java.lang.String 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 ctx, | |
java.lang.String vtl, | |
int 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> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> | |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> | |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> | |
</TR> | |
</TABLE> | |
</TD> | |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> | |
</EM> | |
</TD> | |
</TR> | |
<TR> | |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> | |
<A HREF="../../../../../org/apache/velocity/tools/generic/NumberTool.html" title="class in org.apache.velocity.tools.generic"><B>PREV CLASS</B></A> | |
<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> | |
<A HREF="RenderTool.html" target="_top"><B>NO FRAMES</B></A> | |
<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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> | |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> | |
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <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> |