blob: 0a767010649b927877da57400a9f542c269a64ee [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- saved from url=(0014)about:internet -->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_19) on Sun Mar 20 20:56:07 PKT 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
VelocityTemplateService (Click Framework API - v2.3.0)
</TITLE>
<META NAME="keywords" CONTENT="org.apache.click.service.VelocityTemplateService class">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="VelocityTemplateService (Click Framework API - v2.3.0)";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white">
<!-- ========= 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/click/service/TemplateService.html" title="interface in org.apache.click.service"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/click/service/VelocityTemplateService.LogChuteAdapter.html" title="class in org.apache.click.service"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/click/service/VelocityTemplateService.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VelocityTemplateService.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;<A HREF="#nested_class_summary">NESTED</A>&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.click.service</FONT>
<BR>
Class VelocityTemplateService</H2>
<PRE>
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
<IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.click.service.VelocityTemplateService</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>VelocityTemplateService</B><DT>extends <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></DL>
</PRE>
<P>
Provides a <a target="_blank" href="http://velocity.apache.org//">Velocity</a> TemplateService class.
<p/>
Velocity provides a simple to use, but powerful and performant templating engine
for the Click Framework. The Velocity templating engine is configured and accessed
by this VelocityTemplateService class.
Velocity is the default templating engine used by Click and the Velocity class
dependencies are included in the standard Click JAR file.
<p/>
You can also instruct Click to use a different template service implementation.
Please see <A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service"><CODE>TemplateService</CODE></A> for more details.
<p/>
To see how to use the Velocity templating language please see the
<a target="blank" href="../../../../../velocity/VelocityUsersGuide.pdf">Velocity Users Guide</a>.
<h3>Velocity Configuration</h3>
The VelocityTemplateService is the default template service used by Click,
so it does not require any specific configuration.
However if you wanted to configure this service specifically in your
<tt>click.xml</tt> configuration file you would add the following XML element.
<pre class="codeConfig">
&lt;<span class="red">template-service</span> classname="<span class="blue">org.apache.click.service.VelocityTemplateService</span>"/&gt; </pre>
<h4>Velocity Properties</h4>
The Velocity runtime engine is configured through a series of properties when the
VelocityTemplateService is initialized. The default Velocity properties set are:
<pre class="codeConfig">
resource.loader=<span class="blue">webapp</span>, <span class="red">class</span>
<span class="blue">webapp</span>.resource.loader.class=org.apache.velocity.tools.view.WebappResourceLoader
<span class="blue">webapp</span>.resource.loader.cache=[true|false] &nbsp; <span class="green">#depending on application mode</span>
<span class="blue">webapp</span>.resource.loader.modificationCheckInterval=0 <span class="green">#depending on application mode</span>
<span class="red">class.resource</span>.loader.class=org.apache.velocity.runtime.loader.ClasspathResourceLoader
<span class="red">class.resource</span>.loader.cache=[true|false] &nbsp; <span class="green">#depending on application mode</span>
<span class="red">class.resource</span>.loader.modificationCheckInterval=0 <span class="green">#depending on application mode</span>
velocimacro.library.autoreload=[true|false] <span class="green">#depending on application mode</span>
velocimacro.library=click/VM_global_library.vm
</pre>
This service uses the Velocity Tools WebappResourceLoader for loading templates.
This avoids issues associate with using the Velocity FileResourceLoader on JEE
application servers.
<p/>
See the Velocity
<a target="topic" href="../../../../../velocity/developer-guide.html#Velocity Configuration Keys and Values">Developer Guide</a>
for details about these properties. Note when the application is in <tt>trace</tt> mode
the Velocity properties used will be logged on startup.
<p/>
If you want to add some of your own Velocity properties, or replace Click's
properties, add a <span class="blue"><tt>velocity.properties</tt></span> file in the <tt>WEB-INF</tt>
directory. Click will automatically pick up this file and load these properties.
<p/>
As a example say we have our own Velocity macro library called
<tt>mycorp.vm</tt> we can override the default <tt>velocimacro.library</tt>
property by adding a <tt>WEB-INF/velocity.properties</tt> file to our web
application. In this file we would then define the property as:
<pre class="codeConfig">
velocimacro.library=<span class="blue">mycorp.vm</span> </pre>
Note do not place Velocity macros under the WEB-INF directory as the Velocity
ResourceManager will not be able to load them.
<p/>
The simplest way to set your own macro file is to add a file named <span class="blue"><tt>macro.vm</tt></span>
under your web application's root directory. At startup Click will first check to see
if this file exists, and if it does it will use it instead of <tt>click/VM_global_library.vm</tt>.
<h3>Application Modes and Caching</h3>
<h4>Production and Profile Mode</h4>
When the Click application is in <tt>production</tt> or <tt>profile</tt> mode Velocity caching
is enabled. With caching enables page templates and macro files are loaded and
parsed once and then are cached for use with later requests. When in
<tt>production</tt> or <tt>profile</tt> mode the following Velocity runtime
properties are set:
<pre class="codeConfig">
webapp.resource.loader.cache=true
webapp.resource.loader.modificationCheckInterval=0
class.resource.loader.cache=true
class.resource.loader.modificationCheckInterval=0
velocimacro.library.autoreload=false </pre>
When running in these modes the <A HREF="../../../../org/apache/click/service/ConsoleLogService.html" title="class in org.apache.click.service"><CODE>ConsoleLogService</CODE></A> will be configured
to use
<h4>Development and Debug Modes</h4>
When the Click application is in <tt>development</tt>, <tt>debug</tt> or <tt>trace</tt>
modes Velocity caching is disabled. When caching is disabled page templates
and macro files are reloaded and parsed when ever they changed. With caching
disabled the following Velocity
runtime properties are set:
<pre class="codeConfig">
webapp.resource.loader.cache=false
class.resource.loader.cache=false
velocimacro.library.autoreload=true </pre>
Disabling caching is useful for application development where you can edit page
templates on a running application server and see the changes immediately.
<p/>
<b>Please Note</b> Velocity caching should be used for production as Velocity
template reloading is much much slower and the process of parsing and
introspecting templates and macros can use a lot of memory.
<h3>Velocity Logging</h3>
Velocity logging is very verbose at the best of times, so this service
keeps the logging level at <tt>ERROR</tt> in all modes except <tt>trace</tt>
mode where the Velocity logging level is set to <tt>WARN</tt>.
<p/>
If you are having issues with some Velocity page templates or macros please
switch the application mode into <tt>trace</tt> so you can see the warning
messages provided.
<p/>
To support the use of Click <tt>LogService</tt> classes inside the Velocity
runtime a <A HREF="../../../../org/apache/click/service/VelocityTemplateService.LogChuteAdapter.html" title="class in org.apache.click.service"><CODE>VelocityTemplateService.LogChuteAdapter</CODE></A> class is provided. This class wraps the
Click LogService with a Velocity <tt>LogChute</tt> so the Velocity runtime can
use it for logging messages to.
<p/>
If you are using LogServices other than <A HREF="../../../../org/apache/click/service/ConsoleLogService.html" title="class in org.apache.click.service"><CODE>ConsoleLogService</CODE></A> you will
probably configure that service to filter out Velocity's verbose <tt>INFO</tt>
level messages.
<P>
<P>
<HR>
<P>
<!-- ======== NESTED CLASS SUMMARY ======== -->
<A NAME="nested_class_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>Nested Class Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.LogChuteAdapter.html" title="class in org.apache.click.service">VelocityTemplateService.LogChuteAdapter</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provides a Velocity <tt>LogChute</tt> adapter class around the application
log service to enable the Velocity Runtime to log to the application
LogService.</TD>
</TR>
</TABLE>
&nbsp;<!-- =========== 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>protected &nbsp;<A HREF="../../../../org/apache/click/service/ConfigService.html" title="interface in org.apache.click.service">ConfigService</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#configService">configService</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The application configuration service.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#DEFAULT_TEMPLATE_PROPS">DEFAULT_TEMPLATE_PROPS</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default velocity properties filename: &nbsp;
"<tt>/WEB-INF/velocity.properties</tt>".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#deployedErrorTemplate">deployedErrorTemplate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The /click/error.htm page template has been deployed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#deployedNotFoundTemplate">deployedNotFoundTemplate</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The /click/not-found.htm page template has been deployed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#ERROR_PAGE_PATH">ERROR_PAGE_PATH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The click error page template path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#MACRO_VM_FILE_NAME">MACRO_VM_FILE_NAME</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The user supplied macro file name: &nbsp; "<tt>macro.vm</tt>".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#NOT_FOUND_PAGE_PATH">NOT_FOUND_PAGE_PATH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The click not found page template path.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.velocity.app.VelocityEngine</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#velocityEngine">velocityEngine</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The VelocityEngine instance.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#VM_FILE_PATH">VM_FILE_PATH</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The global Velocity macro file path: &nbsp;
"<tt>/click/VM_global_library.vm</tt>".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#WRITER_BUFFER_SIZE">WRITER_BUFFER_SIZE</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Velocity writer buffer size.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;org.apache.velocity.util.SimplePool</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#writerPool">writerPool</A></B></CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cache of velocity writers.</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/click/service/VelocityTemplateService.html#VelocityTemplateService()">VelocityTemplateService</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>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#getInitLogLevel()">getInitLogLevel</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Velocity Engine initialization log level.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#getInitProperties()">getInitProperties</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the Velocity Engine initialization properties.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../org/apache/click/service/VelocityTemplateService.html#internalRenderTemplate(java.lang.String, org.apache.click.Page, java.util.Map, java.io.Writer)">internalRenderTemplate</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;templatePath,
<A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>&nbsp;page,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Provides the underlying Velocity template rendering.</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/click/service/VelocityTemplateService.html#onDestroy()">onDestroy</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Destroy the TemplateService.</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/click/service/VelocityTemplateService.html#onInit(javax.servlet.ServletContext)">onInit</A></B>(<A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initialize the TemplateService with the given application configuration
service instance.</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/click/service/VelocityTemplateService.html#renderTemplate(org.apache.click.Page, java.util.Map, java.io.Writer)">renderTemplate</A></B>(<A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>&nbsp;page,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Render the given page to the writer.</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/click/service/VelocityTemplateService.html#renderTemplate(java.lang.String, java.util.Map, java.io.Writer)">renderTemplate</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;templatePath,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Render the given template and model to the writer.</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.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></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_TEMPLATE_PROPS"><!-- --></A><H3>
DEFAULT_TEMPLATE_PROPS</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>DEFAULT_TEMPLATE_PROPS</B></PRE>
<DL>
<DD>The default velocity properties filename: &nbsp;
"<tt>/WEB-INF/velocity.properties</tt>".
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.DEFAULT_TEMPLATE_PROPS">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="ERROR_PAGE_PATH"><!-- --></A><H3>
ERROR_PAGE_PATH</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>ERROR_PAGE_PATH</B></PRE>
<DL>
<DD>The click error page template path.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.ERROR_PAGE_PATH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="MACRO_VM_FILE_NAME"><!-- --></A><H3>
MACRO_VM_FILE_NAME</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>MACRO_VM_FILE_NAME</B></PRE>
<DL>
<DD>The user supplied macro file name: &nbsp; "<tt>macro.vm</tt>".
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.MACRO_VM_FILE_NAME">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="NOT_FOUND_PAGE_PATH"><!-- --></A><H3>
NOT_FOUND_PAGE_PATH</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>NOT_FOUND_PAGE_PATH</B></PRE>
<DL>
<DD>The click not found page template path.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.NOT_FOUND_PAGE_PATH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="VM_FILE_PATH"><!-- --></A><H3>
VM_FILE_PATH</H3>
<PRE>
protected static final <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>VM_FILE_PATH</B></PRE>
<DL>
<DD>The global Velocity macro file path: &nbsp;
"<tt>/click/VM_global_library.vm</tt>".
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.VM_FILE_PATH">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="WRITER_BUFFER_SIZE"><!-- --></A><H3>
WRITER_BUFFER_SIZE</H3>
<PRE>
protected static final int <B>WRITER_BUFFER_SIZE</B></PRE>
<DL>
<DD>The Velocity writer buffer size.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../constant-values.html#org.apache.click.service.VelocityTemplateService.WRITER_BUFFER_SIZE">Constant Field Values</A></DL>
</DL>
<HR>
<A NAME="configService"><!-- --></A><H3>
configService</H3>
<PRE>
protected <A HREF="../../../../org/apache/click/service/ConfigService.html" title="interface in org.apache.click.service">ConfigService</A> <B>configService</B></PRE>
<DL>
<DD>The application configuration service.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="deployedErrorTemplate"><!-- --></A><H3>
deployedErrorTemplate</H3>
<PRE>
protected boolean <B>deployedErrorTemplate</B></PRE>
<DL>
<DD>The /click/error.htm page template has been deployed.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="deployedNotFoundTemplate"><!-- --></A><H3>
deployedNotFoundTemplate</H3>
<PRE>
protected boolean <B>deployedNotFoundTemplate</B></PRE>
<DL>
<DD>The /click/not-found.htm page template has been deployed.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="velocityEngine"><!-- --></A><H3>
velocityEngine</H3>
<PRE>
protected org.apache.velocity.app.VelocityEngine <B>velocityEngine</B></PRE>
<DL>
<DD>The VelocityEngine instance.
<P>
<DL>
</DL>
</DL>
<HR>
<A NAME="writerPool"><!-- --></A><H3>
writerPool</H3>
<PRE>
protected org.apache.velocity.util.SimplePool <B>writerPool</B></PRE>
<DL>
<DD>Cache of velocity writers.
<P>
<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="VelocityTemplateService()"><!-- --></A><H3>
VelocityTemplateService</H3>
<PRE>
public <B>VelocityTemplateService</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="onInit(javax.servlet.ServletContext)"><!-- --></A><H3>
onInit</H3>
<PRE>
public void <B>onInit</B>(<A HREF="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html" title="class or interface in javax.servlet">ServletContext</A>&nbsp;servletContext)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#onInit(javax.servlet.ServletContext)">TemplateService</A></CODE></B></DD>
<DD>Initialize the TemplateService with the given application configuration
service instance.
<p/>
This method is invoked after the TemplateService has been constructed.
<p/>
Note you can access <A HREF="../../../../org/apache/click/service/ConfigService.html" title="interface in org.apache.click.service"><CODE>ConfigService</CODE></A> by invoking
<A HREF="../../../../org/apache/click/util/ClickUtils.html#getConfigService(javax.servlet.ServletContext)"><CODE>ClickUtils.getConfigService(javax.servlet.ServletContext)</CODE></A>
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#onInit(javax.servlet.ServletContext)">onInit</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>servletContext</CODE> - the application servlet velocityContext
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Exception.html" title="class or interface in java.lang">Exception</A></CODE> - if an error occurs initializing the Template Service<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/service/TemplateService.html#onInit(javax.servlet.ServletContext)"><CODE>TemplateService.onInit(ServletContext)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="onDestroy()"><!-- --></A><H3>
onDestroy</H3>
<PRE>
public void <B>onDestroy</B>()</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#onDestroy()">TemplateService</A></CODE></B></DD>
<DD>Destroy the TemplateService.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#onDestroy()">onDestroy</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/service/TemplateService.html#onDestroy()"><CODE>TemplateService.onDestroy()</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="renderTemplate(org.apache.click.Page, java.util.Map, java.io.Writer)"><!-- --></A><H3>
renderTemplate</H3>
<PRE>
public void <B>renderTemplate</B>(<A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>&nbsp;page,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(org.apache.click.Page, java.util.Map, java.io.Writer)">TemplateService</A></CODE></B></DD>
<DD>Render the given page to the writer.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(org.apache.click.Page, java.util.Map, java.io.Writer)">renderTemplate</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>page</CODE> - the page template to render<DD><CODE>model</CODE> - the model to merge with the template and render<DD><CODE>writer</CODE> - the writer to send the merged template and model data to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an IO error occurs
<DD><CODE><A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></CODE> - if template error occurs<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(org.apache.click.Page, java.util.Map, java.io.Writer)"><CODE>TemplateService.renderTemplate(Page, Map, Writer)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="renderTemplate(java.lang.String, java.util.Map, java.io.Writer)"><!-- --></A><H3>
renderTemplate</H3>
<PRE>
public void <B>renderTemplate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;templatePath,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(java.lang.String, java.util.Map, java.io.Writer)">TemplateService</A></CODE></B></DD>
<DD>Render the given template and model to the writer.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(java.lang.String, java.util.Map, java.io.Writer)">renderTemplate</A></CODE> in interface <CODE><A HREF="../../../../org/apache/click/service/TemplateService.html" title="interface in org.apache.click.service">TemplateService</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>templatePath</CODE> - the path of the template to render<DD><CODE>model</CODE> - the model to merge with the template and render<DD><CODE>writer</CODE> - the writer to send the merged template and model data to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an IO error occurs
<DD><CODE><A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></CODE> - if an error occurs<DT><B>See Also:</B><DD><A HREF="../../../../org/apache/click/service/TemplateService.html#renderTemplate(java.lang.String, java.util.Map, java.io.Writer)"><CODE>TemplateService.renderTemplate(String, Map, Writer)</CODE></A></DL>
</DD>
</DL>
<HR>
<A NAME="getInitLogLevel()"><!-- --></A><H3>
getInitLogLevel</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Integer.html" title="class or interface in java.lang">Integer</A> <B>getInitLogLevel</B>()</PRE>
<DL>
<DD>Return the Velocity Engine initialization log level.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the Velocity Engine initialization log level</DL>
</DD>
</DL>
<HR>
<A NAME="getInitProperties()"><!-- --></A><H3>
getInitProperties</H3>
<PRE>
protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html" title="class or interface in java.util">Properties</A> <B>getInitProperties</B>()
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></PRE>
<DL>
<DD>Return the Velocity Engine initialization properties.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the Velocity Engine initialization properties
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/net/MalformedURLException.html" title="class or interface in java.net">MalformedURLException</A></CODE> - if a resource cannot be loaded</DL>
</DD>
</DL>
<HR>
<A NAME="internalRenderTemplate(java.lang.String, org.apache.click.Page, java.util.Map, java.io.Writer)"><!-- --></A><H3>
internalRenderTemplate</H3>
<PRE>
protected void <B>internalRenderTemplate</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;templatePath,
<A HREF="../../../../org/apache/click/Page.html" title="class in org.apache.click">Page</A>&nbsp;page,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html" title="class or interface in java.util">Map</A>&lt;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>,?&gt;&nbsp;model,
<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/Writer.html" title="class or interface in java.io">Writer</A>&nbsp;writer)
throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A>,
<A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></PRE>
<DL>
<DD>Provides the underlying Velocity template rendering.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>templatePath</CODE> - the template path to render<DD><CODE>page</CODE> - the page template to render<DD><CODE>model</CODE> - the model to merge with the template and render<DD><CODE>writer</CODE> - the writer to send the merged template and model data to
<DT><B>Throws:</B>
<DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html" title="class or interface in java.io">IOException</A></CODE> - if an IO error occurs
<DD><CODE><A HREF="../../../../org/apache/click/service/TemplateException.html" title="class in org.apache.click.service">TemplateException</A></CODE> - if template error occurs</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/click/service/TemplateService.html" title="interface in org.apache.click.service"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../org/apache/click/service/VelocityTemplateService.LogChuteAdapter.html" title="class in org.apache.click.service"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html?org/apache/click/service/VelocityTemplateService.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="VelocityTemplateService.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;<A HREF="#nested_class_summary">NESTED</A>&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>
<style type='text/css'>.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;}.typ{color:#000;}.lit{color:#066;}.pun{color:#660;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}.dec{color:#606;}pre.prettyprint{padding:1em;border:1px solid #888;overflow:auto;}@media print{.str{color:#2A00FF;}.kwd{color:#7F0055;font-weight:bold;}.com{color:#3F7F5F;font-style:italic;}.typ{color:#000;font-weight:bold;}.lit{color:#044;}.pun{color:#440;}.pln{color:#000;}.tag{color:#000099;font-weight:bold;}.atn{color:#009900;}.atv{color:#000;}}</style><script type='text/javascript'>var PR_keywords={};(function(){var CPP_KEYWORDS='abstract bool break case catch char class const '+'const_cast continue default delete deprecated dllexport dllimport do '+'double dynamic_cast else enum explicit extern false float for friend '+'goto if inline int long mutable naked namespace new noinline noreturn '+'nothrow novtable operator private property protected public register '+'reinterpret_cast return selectany short signed sizeof static '+'static_cast struct switch template this thread throw true try typedef '+'typeid typename union unsigned using declaration, directive uuid '+'virtual void volatile while typeof';var CSHARP_KEYWORDS='as base by byte checked decimal delegate descending '+'event finally fixed foreach from group implicit in interface internal '+'into is lock null object override orderby params readonly ref sbyte '+'sealed stackalloc string select uint ulong unchecked unsafe ushort var';var JAVA_KEYWORDS='package synchronized boolean implements import throws '+'instanceof transient extends final strictfp native super';var JSCRIPT_KEYWORDS='debugger export function with NaN Infinity';var PERL_KEYWORDS='require sub unless until use elsif BEGIN END';var PYTHON_KEYWORDS='and assert def del elif except exec global lambda '+'not or pass print raise yield False True None';var RUBY_KEYWORDS='then end begin rescue ensure module when undef next '+'redo retry alias defined';var SH_KEYWORDS='done fi';var KEYWORDS=[CPP_KEYWORDS,CSHARP_KEYWORDS,JAVA_KEYWORDS,JSCRIPT_KEYWORDS,PERL_KEYWORDS,PYTHON_KEYWORDS,RUBY_KEYWORDS,SH_KEYWORDS];for(var k=0;k<KEYWORDS.length;k++){var kw=KEYWORDS[k].split(' ');for(var i=0;i<kw.length;i++){if(kw[i]){PR_keywords[kw[i]]=true;}}}}).call(this);var PR_STRING='str';var PR_KEYWORD='kwd';var PR_COMMENT='com';var PR_TYPE='typ';var PR_LITERAL='lit';var PR_PUNCTUATION='pun';var PR_PLAIN='pln';var PR_TAG='tag';var PR_DECLARATION='dec';var PR_SOURCE='src';var PR_ATTRIB_NAME='atn';var PR_ATTRIB_VALUE='atv';var PR_TAB_WIDTH=8;function PR_isWordChar(ch){return(ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z');}function PR_spliceArrayInto(inserted,container,containerPosition,countReplaced){inserted.unshift(containerPosition,countReplaced||0);try{container.splice.apply(container,inserted);}finally{inserted.splice(0,2);}}var REGEXP_PRECEDER_PATTERN=(function(){var preceders=['!','!=','!==','#','%','%=','&','&&','&&=','&=','(','*','*=','+=',',','-=','->','/','/=',':','::',';','<','<<','<<=','<=','=','==','===','>','>=','>>','>>=','>>>','>>>=','?','@','[','^','^=','^^','^^=','{','|','|=','||','||=','~','break','case','continue','delete','do','else','finally','instanceof','return','throw','try','typeof'];var pattern='(?:'+'(?:(?:^|[^0-9\.])\\.{1,3})|'+'(?:(?:^|[^\\+])\\+)|'+'(?:(?:^|[^\\-])-)';for(var i=0;i<preceders.length;++i){var preceder=preceders[i];if(PR_isWordChar(preceder.charAt(0))){pattern+='|\\b'+preceder;}else{pattern+='|'+preceder.replace(/([^=<>:&])/g,'\\$1');}}pattern+='|^)\\s*$';return new RegExp(pattern);})();var pr_amp=/&/g;var pr_lt=/</g;var pr_gt=/>/g;var pr_quot=/"/g;function PR_attribToHtml(str){return str.replace(pr_amp,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;').replace(pr_quot,'&quot;');}function PR_textToHtml(str){return str.replace(pr_amp,'&amp;').replace(pr_lt,'&lt;').replace(pr_gt,'&gt;');}var pr_ltEnt=/&lt;/g;var pr_gtEnt=/&gt;/g;var pr_aposEnt=/&apos;/g;var pr_quotEnt=/&quot;/g;var pr_ampEnt=/&amp;/g;function PR_htmlToText(html){var pos=html.indexOf('&');if(pos<0){return html;}for(--pos;(pos=html.indexOf('&#',pos+1))>=0;){var end=html.indexOf(';',pos);if(end>=0){var num=html.substring(pos+3,end);var radix=10;if(num&&num.charAt(0)=='x'){num=num.substring(1);radix=16;}var codePoint=parseInt(num,radix);if(!isNaN(codePoint)){html=(html.substring(0,pos)+String.fromCharCode(codePoint)+html.substring(end+1));}}}return html.replace(pr_ltEnt,'<').replace(pr_gtEnt,'>').replace(pr_aposEnt,"'").replace(pr_quotEnt,'"').replace(pr_ampEnt,'&');}function PR_isRawContent(node){return'XMP'==node.tagName;}var PR_innerHtmlWorks=null;function PR_getInnerHtml(node){if(null===PR_innerHtmlWorks){var testNode=document.createElement('PRE');testNode.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));PR_innerHtmlWorks=!/</.test(testNode.innerHTML);}if(PR_innerHtmlWorks){var content=node.innerHTML;if(PR_isRawContent(node)){content=PR_textToHtml(content);}return content;}var out=[];for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}return out.join('');}function PR_normalizedHtml(node,out){switch(node.nodeType){case 1:var name=node.tagName.toLowerCase();out.push('\074',name);for(var i=0;i<node.attributes.length;++i){var attr=node.attributes[i];if(!attr.specified){continue;}out.push(' ');PR_normalizedHtml(attr,out);}out.push('>');for(var child=node.firstChild;child;child=child.nextSibling){PR_normalizedHtml(child,out);}if(node.firstChild||!/^(?:br|link|img)$/.test(name)){out.push('<\/',name,'>');}break;case 2:out.push(node.name.toLowerCase(),'="',PR_attribToHtml(node.value),'"');break;case 3:case 4:out.push(PR_textToHtml(node.nodeValue));break;}}function PR_tabExpander(tabWidth){var SPACES=' ';var charInLine=0;return function(plainText){var out=null;var pos=0;for(var i=0,n=plainText.length;i<n;++i){var ch=plainText.charAt(i);switch(ch){case'\t':if(!out){out=[];}out.push(plainText.substring(pos,i));var nSpaces=tabWidth-(charInLine%tabWidth);charInLine+=nSpaces;for(;nSpaces>=0;nSpaces-=SPACES.length){out.push(SPACES.substring(0,nSpaces));}pos=i+1;break;case'\n':charInLine=0;break;default:++charInLine;}}if(!out){return plainText;}out.push(plainText.substring(pos));return out.join('');};}var pr_chunkPattern=/(?:[^<]+|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<\/?[a-zA-Z][^>]*>|<)/g;var pr_commentPrefix=/^<!--/;var pr_cdataPrefix=/^<\[CDATA\[/;var pr_brPrefix=/^<br\b/i;function PR_extractTags(s){var matches=s.match(pr_chunkPattern);var sourceBuf=[];var sourceBufLen=0;var extractedTags=[];if(matches){for(var i=0,n=matches.length;i<n;++i){var match=matches[i];if(match.length>1&&match.charAt(0)==='<'){if(pr_commentPrefix.test(match)){continue;}if(pr_cdataPrefix.test(match)){sourceBuf.push(match.substring(9,match.length-3));sourceBufLen+=match.length-12;}else if(pr_brPrefix.test(match)){sourceBuf.push('\n');sourceBufLen+=1;}else{extractedTags.push(sourceBufLen,match);}}else{var literalText=PR_htmlToText(match);sourceBuf.push(literalText);sourceBufLen+=literalText.length;}}}return{source:sourceBuf.join(''),tags:extractedTags};}function PR_createSimpleLexer(shortcutStylePatterns,fallthroughStylePatterns){var shortcuts={};(function(){var allPatterns=shortcutStylePatterns.concat(fallthroughStylePatterns);for(var i=allPatterns.length;--i>=0;){var patternParts=allPatterns[i];var shortcutChars=patternParts[3];if(shortcutChars){for(var c=shortcutChars.length;--c>=0;){shortcuts[shortcutChars.charAt(c)]=patternParts;}}}})();var nPatterns=fallthroughStylePatterns.length;return function(sourceCode,opt_basePos){opt_basePos=opt_basePos||0;var decorations=[opt_basePos,PR_PLAIN];var lastToken='';var pos=0;var tail=sourceCode;while(tail.length){var style;var token=null;var patternParts=shortcuts[tail.charAt(0)];if(patternParts){var match=tail.match(patternParts[1]);token=match[0];style=patternParts[0];}else{for(var i=0;i<nPatterns;++i){patternParts=fallthroughStylePatterns[i];var contextPattern=patternParts[2];if(contextPattern&&!contextPattern.test(lastToken)){continue;}var match=tail.match(patternParts[1]);if(match){token=match[0];style=patternParts[0];break;}}if(!token){style=PR_PLAIN;token=tail.substring(0,1);}}decorations.push(opt_basePos+pos,style);pos+=token.length;tail=tail.substring(token.length);if(style!==PR_COMMENT&&/\S/.test(token)){lastToken=token;}}return decorations;};}var PR_C_STYLE_STRING_AND_COMMENT_LEXER=PR_createSimpleLexer([[PR_STRING,/^\'(?:[^\\\']|\\[\s\S])*(?:\'|$)/,null,"'"],[PR_STRING,/^"(?:[^\\"]|\\[\s\S])*(?:"|$)/,null,'"'],[PR_STRING,/^\`(?:[^\\\`]|\\[\s\S])*(?:\`|$)/,null,'`']],[[PR_PLAIN,/^(?:[^\'"\`\/\#]+)/,null,' \r\n'],[PR_COMMENT,/^#[^\r\n]*/,null,'#'],[PR_COMMENT,/^\/\/[^\r\n]*/,null],[PR_STRING,/^\/(?:[^\\\*\/]|\\[\s\S])+(?:\/|$)/,REGEXP_PRECEDER_PATTERN],[PR_COMMENT,/^\/\*[\s\S]*?(?:\*\/|$)/,null]]);function PR_splitStringAndCommentTokens(sourceCode){return PR_C_STYLE_STRING_AND_COMMENT_LEXER(sourceCode);}var PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER=PR_createSimpleLexer([],[[PR_PLAIN,/^\s+/,null,' \r\n'],[PR_PLAIN,/^[a-z_$@][a-z_$@0-9]*/i,null],[PR_LITERAL,/^0x[a-f0-9]+[a-z]/i,null],[PR_LITERAL,/^(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?[a-z]*/i,null,'123456789'],[PR_PUNCTUATION,/^[^\s\w\.$@]+/,null]]);function PR_splitNonStringNonCommentTokens(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_PLAIN){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecs=PR_C_STYLE_LITERAL_IDENTIFIER_PUNC_RECOGNIZER(chunk,start);for(var j=0,m=subDecs.length;j<m;j+=2){var subStyle=subDecs[j+1];if(subStyle===PR_PLAIN){var subStart=subDecs[j];var subEnd=j+2<m?subDecs[j+2]:chunk.length;var token=source.substring(subStart,subEnd);if(token=='.'){subDecs[j+1]=PR_PUNCTUATION;}else if(token in PR_keywords){subDecs[j+1]=PR_KEYWORD;}else if(/^@?[A-Z][A-Z$]*[a-z][A-Za-z$]*$/.test(token)){subDecs[j+1]=token.charAt(0)=='@'?PR_LITERAL:PR_TYPE;}}}PR_spliceArrayInto(subDecs,decorations,i,2);i+=subDecs.length-2;}}return decorations;}var PR_MARKUP_LEXER=PR_createSimpleLexer([],[[PR_PLAIN,/^[^<]+/,null],[PR_DECLARATION,/^<!\w[^>]*(?:>|$)/,null],[PR_COMMENT,/^<!--[\s\S]*?(?:-->|$)/,null],[PR_SOURCE,/^<\?[\s\S]*?(?:\?>|$)/,null],[PR_SOURCE,/^<%[\s\S]*?(?:%>|$)/,null],[PR_SOURCE,/^<(script|style|xmp)\b[^>]*>[\s\S]*?<\/\1\b[^>]*>/i,null],[PR_TAG,/^<\/?\w[^<>]*>/,null]]);var PR_SOURCE_CHUNK_PARTS=/^(<[^>]*>)([\s\S]*)(<\/[^>]*>)$/;function PR_tokenizeMarkup(source){var decorations=PR_MARKUP_LEXER(source);for(var i=0;i<decorations.length;i+=2){if(decorations[i+1]===PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var sourceChunk=source.substring(start,end);var match=(sourceChunk.match(PR_SOURCE_CHUNK_PARTS));if(match){decorations.splice(i,2,start,PR_TAG,start+match[1].length,PR_SOURCE,start+match[1].length+(match[2]||'').length,PR_TAG);}}}return decorations;}var PR_TAG_LEXER=PR_createSimpleLexer([[PR_ATTRIB_VALUE,/^\'[^\']*(?:\'|$)/,null,"'"],[PR_ATTRIB_VALUE,/^"[^"]*(?:"|$)/,null,'"'],[PR_PUNCTUATION,/^[<>\/=]+/,null,'<>/=']],[[PR_TAG,/^[\w-]+/,/^</],[PR_ATTRIB_VALUE,/^[\w-]+/,/^=/],[PR_ATTRIB_NAME,/^[\w-]+/,null],[PR_PLAIN,/^\s+/,null,' \r\n']]);function PR_splitTagAttributes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_TAG){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var chunk=source.substring(start,end);var subDecorations=PR_TAG_LEXER(chunk,start);PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceNodes(source,decorations){for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style==PR_SOURCE){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var subDecorations=PR_decorateSource(source.substring(start,end));for(var j=0,m=subDecorations.length;j<m;j+=2){subDecorations[j]+=start;}PR_spliceArrayInto(subDecorations,decorations,i,2);i+=subDecorations.length-2;}}return decorations;}function PR_splitSourceAttributes(source,decorations){var nextValueIsSource=false;for(var i=0;i<decorations.length;i+=2){var style=decorations[i+1];if(style===PR_ATTRIB_NAME){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;nextValueIsSource=/^on|^style$/i.test(source.substring(start,end));}else if(style==PR_ATTRIB_VALUE){if(nextValueIsSource){var start=decorations[i];var end=i+2<decorations.length?decorations[i+2]:source.length;var attribValue=source.substring(start,end);var attribLen=attribValue.length;var quoted=(attribLen>=2&&/^["\']/.test(attribValue)&&attribValue.charAt(0)===attribValue.charAt(attribLen-1));var attribSource;var attribSourceStart;var attribSourceEnd;if(quoted){attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue;}else{attribSourceStart=start+1;attribSourceEnd=end-1;attribSource=attribValue.substring(1,attribValue.length-1);}var attribSourceDecorations=PR_decorateSource(attribSource);for(var j=0,m=attribSourceDecorations.length;j<m;j+=2){attribSourceDecorations[j]+=attribSourceStart;}if(quoted){attribSourceDecorations.push(attribSourceEnd,PR_ATTRIB_VALUE);PR_spliceArrayInto(attribSourceDecorations,decorations,i+2,0);}else{PR_spliceArrayInto(attribSourceDecorations,decorations,i,2);}}nextValueIsSource=false;}}return decorations;}function PR_decorateSource(sourceCode){var decorations=PR_splitStringAndCommentTokens(sourceCode);decorations=PR_splitNonStringNonCommentTokens(sourceCode,decorations);return decorations;}function PR_decorateMarkup(sourceCode){var decorations=PR_tokenizeMarkup(sourceCode);decorations=PR_splitTagAttributes(sourceCode,decorations);decorations=PR_splitSourceNodes(sourceCode,decorations);decorations=PR_splitSourceAttributes(sourceCode,decorations);return decorations;}function PR_recombineTagsAndDecorations(sourceText,extractedTags,decorations){var html=[];var outputIdx=0;var openDecoration=null;var currentDecoration=null;var tagPos=0;var decPos=0;var tabExpander=PR_tabExpander(PR_TAB_WIDTH);function emitTextUpTo(sourceIdx){if(sourceIdx>outputIdx){if(openDecoration&&openDecoration!==currentDecoration){html.push('</span>');openDecoration=null;}if(!openDecoration&&currentDecoration){openDecoration=currentDecoration;html.push('<span class="',openDecoration,'">');}var htmlChunk=PR_textToHtml(tabExpander(sourceText.substring(outputIdx,sourceIdx))).replace(/(\r\n?|\n| ) /g,'$1&nbsp;').replace(/\r\n?|\n/g,'&nbsp;<br>');html.push(htmlChunk);outputIdx=sourceIdx;}}while(true){var outputTag;if(tagPos<extractedTags.length){if(decPos<decorations.length){outputTag=extractedTags[tagPos]<=decorations[decPos];}else{outputTag=true;}}else{outputTag=false;}if(outputTag){emitTextUpTo(extractedTags[tagPos]);if(openDecoration){html.push('</span>');openDecoration=null;}html.push(extractedTags[tagPos+1]);tagPos+=2;}else if(decPos<decorations.length){emitTextUpTo(decorations[decPos]);currentDecoration=decorations[decPos+1];decPos+=2;}else{break;}}emitTextUpTo(sourceText.length);if(openDecoration){html.push('</span>');}return html.join('');}function prettyPrintOne(sourceCodeHtml){try{var sourceAndExtractedTags=PR_extractTags(sourceCodeHtml);var source=sourceAndExtractedTags.source;var extractedTags=sourceAndExtractedTags.tags;var isMarkup=/^\s*</.test(source)&&/>\s*$/.test(source);var decorations=isMarkup?PR_decorateMarkup(source):PR_decorateSource(source);return PR_recombineTagsAndDecorations(source,extractedTags,decorations);}catch(e){if('console'in window){console.log(e);console.trace();}return sourceCodeHtml;}}var PR_SHOULD_USE_CONTINUATION=true;function prettyPrint(opt_whenDone){var codeSegments=[document.getElementsByTagName('pre'),document.getElementsByTagName('code'),document.getElementsByTagName('xmp')];var elements=[];for(var i=0;i<codeSegments.length;++i){for(var j=0;j<codeSegments[i].length;++j){elements.push(codeSegments[i][j]);}}codeSegments=null;var k=0;function doWork(){var endTime=(PR_SHOULD_USE_CONTINUATION?new Date().getTime()+250:Infinity);for(;k<elements.length&&new Date().getTime()<endTime;k++){var cs=elements[k];if(cs.className&&cs.className.indexOf('prettyprint')>=0){var nested=false;for(var p=cs.parentNode;p!=null;p=p.parentNode){if((p.tagName=='pre'||p.tagName=='code'||p.tagName=='xmp')&&p.className&&p.className.indexOf('prettyprint')>=0){nested=true;break;}}if(!nested){var content=PR_getInnerHtml(cs);content=content.replace(/(?:\r\n?|\n)$/,'');var newContent=prettyPrintOne(content);if(!PR_isRawContent(cs)){cs.innerHTML=newContent;}else{var pre=document.createElement('PRE');for(var i=0;i<cs.attributes.length;++i){var a=cs.attributes[i];if(a.specified){pre.setAttribute(a.name,a.value);}}pre.innerHTML=newContent;cs.parentNode.replaceChild(pre,cs);}}}}if(k<elements.length){setTimeout(doWork,250);}else if(opt_whenDone){opt_whenDone();}}doWork();}</script><script type='text/javascript'>prettyPrint();</script></BODY>
</HTML>