velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Christian <si...@stoutstick.com>
Subject Re: VelocityStrutsTools
Date Wed, 13 Aug 2003 08:21:06 GMT
Hi Anthony,

It looks like you're not saving the errors within the Action class:

	saveErrors(request, errors);

- simon


Anthony E. Carlos wrote:
> Hello all:
> 
> The documentation says that "Errors may stem from the validation of a 
> submitted form or from the processing of a request." I know how the 
> validation creates an ActionErrors object comprised of one or more 
> ActionError objects. However, how do you create these while processing a 
> request and have access to them from Velocity (using the ErrorsTool)?
> 
> I've instantiated the objects in my Action class:
> 
> ActionError error = new ActionError("error.adduser.usernamealreadyexists");
> errors.add("error.adduser.usernamealreadyexists", error);
> 
> But, the ErrorsTool doesn't see it in my Velocity page:
> 
> $errors.getAll()<br>
> 
> renders as:
> 
> $errors.getAll()
> 
> Any help is appreciated.
> 
> Thanks!
> 
> Anthony Carlos
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 


Mime
View raw message