View tool to work with the Struts error messages.
Template example(s):
#if( $errors.exist() )
<div class="errors">
#foreach( $e in $errors.all )
$e <br>
#end
</div>
#end
Toolbox configuration:
<tool>
<key>errors</key>
<scope>request</scope>
<class>org.apache.velocity.tools.struts.ErrorsTool</class>
</tool>
This tool should only be used in the request scope.
Since VelocityTools 1.1, ErrorsTool extends ActionMessagesTool.
author: Gabe Sidler author: Nathan Bubna since: VelocityTools 1.0 version: $Id: ErrorsTool.java 479724 2006-11-27 18:49:37Z nbubna $ |