The Velocity Project < Velocity Tools >

Velocity

Velocity Tools

Subprojects

Velocity Tools Changes
       

This document tracks the changes in Velocity Tools between releases.

1.4
       

This section describes changes after the 1.3 release.

  • Added ability to add current request parameters to LinkTool, including controls for automatically and/or manually ignoring some of those. Thanks to Christopher Schultz. (ndb)
  • VELTOOLS-87: fixed infinite recursion in RenderTool. Thanks to Andrea Bernardo Ciddio. (ndb)
  • Upgraded DVSL version used for documentation to v1.0 (ndb)
  • VELTOOLS-85: Fix order preservation problem in SortTool. Thanks to Tatyana. (ndb)
  • Protect BrowserSniffer from requests without user-agent. (cb)
  • Added support for a MethodExceptionHandler - the TilesTool.get() method now only returns null if one isn't present. (maj)
  • Changed StrutsLinkTool.setForward() to look for forwards local to the action mapping, before looking up global forwards. Thanks to Christopher Schultz. (ndb)
  • Rearrange/refactor/deprecate some internal methods in VelocityViewServlet in preparation for VelocityTools 2.0 upgrades. (ndb)
  • Upgraded Velocity Engine dependency to build and test against v1.5. (NOTE: Velocity Engine 1.5 will be required for VelocityTools 2.0.) (ndb)
  • Added propertyKey() and propertyValue() escaping support to EscapeTool (VELTOOLS-81). Thanks to Phil Cornelius for this patch. (ndb)
  • Fixed bug in request-path restriction when using wildcards. (ndb)
  • Make default locale and format for NumberTool configurable, just as they are in DateTool. (ndb)
  • Add ComparisonDateTool (with some tests and showcase demos) for comparing dates and displaying the comparisons textually. Thanks to Chris Townsen for the initial implementation. (ndb)
  • Add ability to configure default Locale for DateTool and to lock down configure() so it is safe to use in application scope. (ndb)
  • Add better support for dynamic locales in MessageTool. Thanks to Christopher Schultz. (ndb)
  • Use ResourceTool for common text throughout the Showcase example. (ndb)
1.3
       

This section describes changes after the 1.2 release.

  • Added ResourceTool and ViewResourceTool for access to and use of ResourceBundles. (ndb)
  • Upgraded to latest versions of Commons-Digester (1.8) and Commons-Validator (1.3.1). (ndb)
  • VELTOOLS-58: Updated ValidatorTool to mirror key changes/features in Struts 1.3.x's JavascriptValidatorTag. Thanks to Christopher Schultz and Niall Pemberton. (ndb)
  • VELTOOLS-73: Added url(String) method to EscapeTool for URL encoding. Thanks to Marc Novakowski for this. (cb)
  • Added start.showcase.webapp and stop.showcase.webapp ant targets to manually launch the showcase webapp using the embedded Jetty servlet container. (cb)
  • Added a testcases framework for generic and view tools. (cb)
  • Changed VelocityViewServlet to look for toolbox config at "/WEB-INF/toolbox.xml" and velocity init properties at "/WEB-INF/velocity.properties" when no other locations are specified (i.e. change the standard location into a convention to reduce configuration needs). (ndb)
  • Upgraded VelocityStruts dependencies to those for Struts 1.3.x series and updated "struts" example app according to provided directions. (ndb)
  • Replaced "layout" example with new "showcase" example to interactively demonstrate all tools and the VelocityLayoutServlet. (ndb)
  • Added auto() and manual() methods to AlternatorTool and deprecated the make() methods that took a boolean parameter. (ndb)
  • Added getAll() method to ParameterParser to retrieve map of all params via $params.all. (ndb)
  • Added configurable getSelf() function to LinkTool to make self-referencing links easier. (ndb)
  • Added create() methods to CookieTool to support more complex Cookie creation. (ndb)
  • Added ContextTool for convenient access to context data and meta-data. (ndb)
  • VELTOOLS-71: Overhauled ant build process: dependencies are now automatically download, jars have manifests, checksums are auto-generated, and more. Also, building with JDK 1.3 is no longer supported. (ndb)
  • Updated license headers and notices to comply with new ASF policy. (henning)
  • Made auto-alternate default of AlternatorTool configurable via toolbox config. (ndb)
  • Add addQueryData(Map) and params(Map) method to LinkTool. Thanks to Mark Brunkhart for this. (ndb)
  • VELTOOLS-56: Fixed a number of problems with ImportSupport. Thanks to Christopher Schultz for this. (ndb)
  • VELTOOLS-67: Add ability to restrict availability of request-scoped tools according to a request path value set in the tool configuration. Thanks to Claude Brisson for this. (ndb)
  • VELTOOLS-68: Change VelocityViewServlet to read logger and resource loader config from velocity.properties file instead of hard-coding it. (henning)
  • Added setAbsolute() and absolute() methods to LinkTool. (ndb)
  • Made default format of DateTool configurable via toolbox definition. (ndb)
  • Deprecated ViewTool and Configurable interfaces. ViewToolInfo has been enhanced to automatically recognize such tools by checking for init(Object) and/or configure(Map) methods. (ndb)
  • Enhanced TextKey trick in MessageTool to make using args and bundles easier. (ndb)
  • Add getInteger() and getDouble() convenience methods to ValueParser. (ndb)
  • Added get() method to StrutsLinkTool to allow syntax like $link.action.saveFoo. (ndb)
  • Added param(), relative(), anchor(), and uri() convenience methods to LinkTool. (ndb)
  • Added currency(), number(), integer(), and percent() convenience methods to NumberTool. (ndb)
  • Changed auto-alternate default in AlternatorTool to match Alternator default.
1.2
       

This section describes changes after the 1.1 release.

  • Updated documentation to cover new features and sync to many infrastructure changes. (ndb)
  • Fixed incomplete escaping in ValidatorTool (patch from Christopher Schultz. Jira Issue VELTOOLS-52). (ndb)
  • Fixed infinite loop logging problem with Tomcat 5.5 in the "simple" example webapp. (ndb)
  • Upgraded jars to Struts 1.2.7, Commons-Logging 1.0.4, Commons-Validator 1.1.4, Digester 1.7, Commons-Collections 3.1, Beanutils 1.7.0, Struts SSL Extension for 1.2, and Commons-Lang 2.1. (ndb)
  • Added VelocityStruts support for non-resource and session-scoped action messages (patch and help from Niall Pemberton. See Jira issues VELTOOLS-1 and VELTOOLS-51). (ndb)
  • Factored generic parsing code out of ParameterParser into new ValueParser for parsing strings pulled from any Map. (ndb)
  • Improved error handling/recovery in toolbox xml parsing by adding validation of tool info. (henning)
  • Added BrowserSnifferTool for identifying browsers and their features (contributed by Claude Brisson). This depends on Java 1.4's regexp support for use. (ndb)
  • Added EscapeTool for commons escaping needs (contributed by Shinobu Kawai). This requires commons-lang for use. (ndb)
  • Added ListTool as utility for using arrays like Lists in templates (contributed by Shinobu Kawai). (ndb)
  • Added DateTool methods to provide easy access to date values (e.g. month, year, day). (ndb)
  • Converted VelocityView and VelocityStruts to use a VelocityEngine instead of the Velocity singleton. This means only the servlets log directly to the VelocityEngine instance; the tools and other classes now use commons-logging (which can still be redirected to the VVS's VelocityEngine). Also, both the RenderTool and LogSystemCommonsLog now support either the singleton or non-singleton approach. (ndb)
  • Fixed bad relative URIs in LinkTool when webapp is installed as root (#32104, reported by Laurent Dauvilaire). (ndb)
  • Factored basic pagination code out of AbstractSearchTool into new AbstractPagerTool. (ndb)
  • Make StrutsUtils.errorMarkup() support errors.prefix/suffix (#31768, patch by Shinobu Kawai). (ndb)
  • Fixed ImportSupport bug with multiple calls to ImportResponseWrapper.getWriter() or getOutputStream() (#32146, patch by Shinobu Kawai). (ndb)
  • Made DateTool.toDate(Object) accept Number in place of Long. (ndb)
  • Fixed RenderTool NPE when passed null VTL string (#31583, reported by Tim Colson). (ndb)
  • Enable template cache refreshing and global macro autoreloading in WebappLoader. (maj)
  • Stopped using Velocity's dependency jar. (maj)
  • Upgraded Struts, commons-collections, commons-logging, and commons-validator to Struts 1.2.4 versions. (maj)
  • Added new SortTool (based on contribution from Brett Sutton). (ndb)
  • Added MathTool methods for totalling or averaging lists or arrays of values (adapted from a contribution by Leon Messerschmidt). (ndb)
  • Prevent NPE in RenderTool.recurse() when an evaluation fails. (ndb)
  • Upgraded jars from Velocity 1.3.1 to Velocity 1.4 (ndb)
  • Simplified MessageTool interface to support $text.this.that syntax instead of just $text.get('this.that') (ndb)
  • Added Alternator and AlternatorTool to improve on the old VelocityFormatter.makeAutoAlternator(). (ndb/dlr)
  • Added new Configurable interface and support for configuring tools in the toolbox definition. (ndb)
  • Added methods for integer division and modulus to MathTool. (ndb)
  • Remove members, methods, and classes deprecated in 1.1. (ndb)
  • Bring example Struts apps up to speed with latest Struts version. (maj)
  • Upgrade jars to Struts 1.2.0 and Validator 1.1.2. (maj)
1.1
       

This section describes changes after the 1.1-rc1 release.

  • Deprecated StrutsUtils' getActionErrors() and getActionMessages() in favor of getErrors() and getMessages(). (ndb)
  • Fixed javadoc warnings during build (patch contributed by Nathan Green). (ndb)
  • Some sort of improvements to Struts example apps. (maj)
1.1-rc1
       

This section describes changes after the 1.1-beta release.

  • Changed recommended keys for MessageTool and ActionMessagesTool to $text and $messages. (ndb)
  • Changed XMLToolboxManager to use thread context classloader when digesting toolbox. (ndb)
  • Fixed session tool initialization/synchronization issue. (ndb)
  • Added TilesTool methods to import attributes to specific scopes (page/request/session/application). (maj)
  • Added new demos for using ValidatorTool, TilesTool, and SecureLinkTool to VelocityStruts example app. (maj)
  • Upgraded/refactored MathTool to add floor() and ceil(), make type-handling more intuitive and flexible, and improve number parsing. (ndb)
  • Improved resource bundle support in ActionMessagesTool. (ndb)
  • ErrorsTool now extends ActionMessagesTool. (ndb)
  • LinkTool now encodes URLs using the response's character encoding. (ndb)
  • Removed inadvertant JDK 1.4 dependencies from ImportSupport. (ndb)
  • Made XMLToolboxManager not abstract (#24840). (ndb)
  • De-staticized non-private methods in RenderTool and LinkTool. (ndb)
  • Added NumberTool for formatting numbers (contributed by Mike Kienenberger). (ndb)
  • Filled out and cleaned up DateTool's toDate(...) methods. (ndb)
  • Changed VelocityViewServlet's error method to print the stack trace of the root cause when it encounters a MethodInvocationException. (ndb)
  • Added importAttributes() method to TilesTool to automatically put all attributes of the current Tiles context into the Velocity context. (maj)
  • Replaced TilesTool's getString(String) method with getAttribute(String) in order to support "put lists." (maj)
1.1-beta1
       

This section describes changes after the 1.0 release.

  • Made VelocityViewServlet use response.getOutputStream() if response.getWriter() fails. This is functionality is deprecated and provided as a migration path from 1.0 behavior. (dlr, ndb)
  • De-staticized MathTool to make it extendable. (ndb)
  • Factored common functionality of ErrorsTool, MessageTool, and ActionMessagesTool into abstract MessageResourcesTool. (ndb)
  • Added ImportTool as a simple ImportSupport-based tool. (maj)
  • Converted TilesTool to extend ImportSupport. This allows easy mixing of view technologies (JSP, Velocity, etc.) in VelocityStruts applications. (thanks go to Matthew Payne for the idea!) (maj)
  • Added ImportSupport class for building tools that can import resources from local or remote URLS. (maj)
  • Overhauled DateTool to make it more extendable, user-friendly, and add support for standard, localized date-time styles (see DateTool javadoc for more). (ndb)
  • Added support for specifying message resource bundles to StrutsUtils, ErrorsTool, ActionMessagesTool, and MessageTool. (maj,ndb)
  • Added commons-validator (1.0.2) and sslext jars to library. (maj)
  • Added SecureLinkTool for using Struts SSL Extension with VelocityStruts. (maj)
  • Added ValidatorTool to provide Struts 1.1 javascript validation for VelocityStruts. (maj)
  • output.encoding property (if non-default) is appended to default content-type as the charset. (ndb)
  • VelocityViewServlet now uses response.getWriter() instead of response.getOutputStream() as suggested by Matthew Payne. (ndb)
  • Improved VelocityViewServlet error handling (exceptions are logged and error() is now more robust). (ndb)
  • Put VelocityViewServlet's requestCleanup() call in a 'finally' clause to allow clean after errors during a request. (dlr)
  • Fixed miscellaneous javadoc and doc typos (many of which were reported by Takayoshi Kimura) (ndb)
  • Allow system to reclaim objects held by pooled writers in VelocityViewServlet (see bug 18951) (ndb)
  • Changed LinkTool to automatically check for XHTML setting (ndb)
  • Added support for standard XHTML mode setting via toolbox config (ndb)
  • Moved request/response/session/application keys to ViewContext and add getAttribute() method (ndb)
  • Added selectModule() and getForwardURL() to StrutsUtils (maj)
  • Convert VelocityStruts tools to use new StrutsUtils methods and be module aware (maj)
  • Removed unused imports from StrutsLinkTool (ndb)
  • Refactor StrutsUtils to use Struts 1.1 classes and support modules (maj)
  • Added TilesTool (maj)
  • Allow subclasses of VelocityViewServlet to use different ToolboxManager implementations (ndb)
  • Added CookieTool (contributed by Dmitri Colebatch) (ndb)
  • Added demo of <data> elements to simple VelocityView example (ndb)
  • Made simple VelocityStruts example catch Commons-Logging output with LogSystemCommonsLog (ndb)
  • Convert toolbox setup to use Digester instead of dom4j (ndb)
  • Added LogSystemCommonsLog and CommonsLogLogSystem to provide bridges between Commons-Logging and Velocity's LogSystem (ndb)
  • Added Commons Logging 1.0.3 jar (ndb)
  • Added ActionMessagesTool (ndb)
  • Upgrade deprecated Struts 1.0 uses in examples (ndb)
  • Updated jars to Struts 1.1, BeanUtils 1.6.1, Digester 1.5, Collections 2.1 (ndb)
1.0
       
  • Initial release.

Copyright © 1999-2003, Apache Software Foundation