velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1753321 - in /velocity/site/production/engine/devel: changes.html developer-guide.html
Date Mon, 18 Jul 2016 21:47:56 GMT
Author: cbrisson
Date: Mon Jul 18 21:47:56 2016
New Revision: 1753321

[site] same in prod


Modified: velocity/site/production/engine/devel/changes.html
--- velocity/site/production/engine/devel/changes.html (original)
+++ velocity/site/production/engine/devel/changes.html Mon Jul 18 21:47:56 2016
@@ -316,6 +316,13 @@ h2:hover > .headerlink, h3:hover > .head
           <img src="images/add.png"/>
+        <td> The new configuration property context.autoreference.key, if present,
allows to specify the name of the reference under which the context is accessible in itself
. Fixes <a href="">VELOCITY-799</a>.
+        <td>cbrisson</td>
+      </tr>
+      <tr>
+        <td>
+          <img src="images/add.png"/>
+        </td>
         <td> MethodExceptionEventHandler now provide template location infos . Fixes
<a href="">VELOCITY-746</a>.

Modified: velocity/site/production/engine/devel/developer-guide.html
--- velocity/site/production/engine/devel/developer-guide.html (original)
+++ velocity/site/production/engine/devel/developer-guide.html Mon Jul 18 21:47:56 2016
@@ -283,6 +283,7 @@ h2:hover > .headerlink, h3:hover > .head
 <li><a href="#math">Math</a></li>
 <li><a href="#parser-configuration">Parser Configuration</a></li>
 <li><a href="#pluggable-introspection">Pluggable Introspection</a></li>
+<li><a href="#context">Context</a></li>
 <li><a href="#configuring-logging">Configuring Logging</a></li>
@@ -1036,8 +1037,8 @@ eventhandler.escape.sql.match = /sql.*/
 <p><code>&lt;name&gt;.resource.loader.modificationCheckInterval = 2</code></p>
 <p>This is the number of seconds between modification checks when caching is turned
on.  When this is an integer &gt; 0, this represents the number of seconds between checks
to see if the template was modified.  If the template has been modified since last check,
then it is reloaded and reparsed.  Otherwise nothing is done.  When &lt;= 0, no modification
checks will take place, and assuming that the property <code>cache</code> (above)
is true, once a template is loaded and parsed the first time it is used, it will not be checked
or reloaded after that until the application or servlet engine is restarted.</p>
 <p>To illustrate, here is an example taken right from the default Velocity properties,
showing how setting up the FileResourceLoader is managed</p>
 <div class="codehilite"><pre>resource.loader = file
 file.resource.loader.description = Velocity File Resource Loader
@@ -1117,8 +1118,15 @@ file.resource.loader.modificationCheckIn
 <h3 id="pluggable-introspection">Pluggable Introspection<a class="headerlink" href="#pluggable-introspection"
title="Permanent link">&para;</a></h3>
 <p><code>runtime.introspector.uberspect = org.apache.velocity.util.introspection.UberspectImpl</code></p>
 <p>This property sets the 'Uberspector', the introspection package that handles all
introspection strategies for Velocity. You can specify a comma-separated list of Uberspector
classes, in which case all Uberspectors are chained. The default chaining behaviour is to
return the first non-null value for each introspection call among all provided uberspectors.
You can modify this behaviour (for instance to restrict access to some methods) by subclassing
org.apache.velocity.util.introspection.AbstractChainableUberspector (or implementing directly
org.apache.velocity.util.introspection.ChainableUberspector).  This allows you to create more
interesting rules or patterns for Uberspection, rather than just returning the first non-null
 <p>Some alternate Uberspectors are provided. You would for instance use <code>runtime.introspector.uberspect
= org.apache.velocity.util.introspection.SecureUberspector</code> to avoid template
authors to instanciate new classes or to use reflection, or use <code>runtime.introspector.uberspect
= org.apache.velocity.util.introspection.UberspectImpl, org.apache.velocity.util.introspection.UberspectPublicFields</code>
to expose Java public fields in your templates.</p>
+<h3 id="context">Context<a class="headerlink" href="#context" title="Permanent link">&para;</a></h3>
+<p><code>context.autoreference.key = *name*</code></p>
+<p>This property has no default value. If present, the Context object will become accessible
from the templates under the provided name. For instance, with the configuration <code>context.autoreference.key
= self</code>, <code>$self</code> will contain the context itself. This
feature is meant to be used for debugging purposes.</p>
 <h2 id="configuring-logging">Configuring Logging<a class="headerlink" href="#configuring-logging"
title="Permanent link">&para;</a></h2>
 <p>Since version 2.0, Velocity has switched to the <a href="">SLF4J</a>
logging facade.</p>
 <p>All you have to do to enable logging is to make sure that your classpath contains
the slf4j-api jar, and one and only one slf4j binding jar towards your favourite logsystem
or facade. See the <a href="#dependencies">dependecies</a> section for a list
of SLF4J bindings.</p>

View raw message