The Jakarta Project < Velocity Tools - Library >

Velocity Tools

Generic Tools

Tool Documentation

Other Subprojects

Overview
       

GenericTools contains a collection of reusable and well documented tools and utility classes of general interest to Velocity users. These classes and tools have no dependency on the VelocityView or VelocityStruts sub-projects. The tools may be used as you would any other POJO ("plain old java object").

Tools:

DateTool
A tool for manipulating and formatting dates.
MathTool
A tool for performing floating point math.
NumberTool
A tool for formatting numbers.
RenderTool
A tool to evaluate and render arbitrary strings of VTL (Velocity Template Language).
EscapeTool
A tool to help with common escaping needs in Velocity templates.
Alternator and AlternatorTool
Utility class for easily alternating over values in a list and tool for easy creation of Alternators in templates.
ValueParser
A tool to retrieve and parse String values pulled from a map. This provides the basis for the ParameterParser in VelocityView.
ListTool
A tool to help when working with arrays or Lists. This tool transparently handles both the same way.
SortTool
A tool that allows a user to sort a collection (or array, iterator, etc) on any arbitary set of properties exposed by the objects contained within the collection.
IteratorTool
A convenience tool to use with #foreach loops. It wraps a list to let the designer specify a condition to terminate the loop, and reuse the same list in different loops.

Utilities:
CommonsLogLogSystem
An implementation of Velocity's LogSystem interface that redirects log output to a Commons-Logging Log instance.
LogSystemCommonsLog
An implementation of Commons-Logging's Log interface that redirects log output to Velocity's LogSystem.


Contributions
       

We welcome your contributions to this library. Patches can be sent to the mailing list or attached to a JIRA issue. The Wiki can also be a good place to discuss and develop ideas.

Checklist for Contributions

  • Velocity coding conventions
  • JavaDoc included (the more detailed the better)
  • Examples included (in JavaDoc or as stand-alone template example)

Copyright © 1999-2003, Apache Software Foundation