| Home >> All >> org >> apache >> velocity >> [ app Javadoc ] |
| | org.apache.velocity.app.event.* (5) | | org.apache.velocity.app.tools.* (1) |
org.apache.velocity.app: Javadoc index of package org.apache.velocity.app.
Package Samples:
org.apache.velocity.app.event
org.apache.velocity.app.tools
Classes:
FieldMethodizer: This is a small utility class allow easy access to static fields in a class, such as string constants. Velocity will not introspect for class fields (and won't in the future :), but writing setter/getter methods to do this really is a pain, so use this if you really have to access fields. The idea it so enable access to the fields just like you would in Java. For example, in Java, you would access a static field like MyClass.STRING_CONSTANT and that is the same thing we are trying to allow here. So to use in your Java code, do something like this : context.put("runtime", new FieldMethodizer( "org.apache.velocity.runtime.Runtime" ...
Velocity: This class provides services to the application developer, such as : Simple Velocity Runtime engine initialization methods. Functions to apply the template engine to streams and strings to allow embedding and dynamic template generation. Methods to access Velocimacros directly. While the most common way to use Velocity is via templates, as Velocity is a general-purpose template engine, there are other uses that Velocity is well suited for, such as processing dynamically created templates, or processing content streams. The methods herein were developed to allow easy access to the Velocity facilities ...
VelocityEngine: This class provides a separate new-able instance of the Velocity template engine. The alternative model for use is using the Velocity class which employs the singleton model. Please ensure that you call one of the init() variants. This is critical for proper behavior. Coming soon : Velocity will call the parameter-less init() at the first use of this class if the init() wasn't explicitly called. While this will ensure that Velocity functions, it almost certainly won't function in the way you intend, so please make sure to call init().
VelocityFormatter: Formatting tool for inserting into the Velocity WebContext. Can format dates or lists of objects. Here's an example of some uses: $formatter.formatShortDate($object.Date) $formatter.formatLongDate($db.getRecord(232).getDate()) $formatter.formatArray($array) $formatter.limitLen(30, $object.Description)
MethodExceptionEventHandler: Called when a method throws an exception. This gives the application a chance to deal with it and either return something nice, or throw. Please return what you want rendered into the output stream.
ReferenceInsertionEventHandler: Reference 'Stream insertion' event handler. Called with object that will be inserted into stream via value.toString(). Please return an Object that will toString() nicely :)
NullSetEventHandler: Event handler : lets an app approve / veto writing a log message when RHS of #set() is null.
EventHandler: Base interface for all event handlers
EventCartridge: 'Package' of event handlers...
| Home | Contact Us | Privacy Policy | Terms of Service |