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").
- A tool for manipulating and formatting dates.
- A tool for performing floating point math.
- A tool for formatting numbers.
- A tool to evaluate and render arbitrary strings of VTL (Velocity
- A tool to help with common escaping needs in Velocity templates.
- A tool to simplify access to ResourceBundles for internationalization or other dynamic content needs.
- Utility class for easily alternating over values in a list and tool for easy creation of Alternators in templates.
- A tool to retrieve and parse String values pulled from a map. This provides
the basis for the ParameterParser in
- A tool to help when working with arrays or Lists. This tool transparently handles both the same way.
- 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
- 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.
- An implementation of Velocity's LogSystem interface that redirects
log output to a Commons-Logging Log instance.
- An implementation of Commons-Logging's Log interface that redirects
log output to Velocity's LogSystem.
We welcome your contributions to this library. Patches can be sent to the
mailing list or attached to a
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)