velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben <newread...@gmail.com>
Subject Re: Omit square brackets in ErrorsTool
Date Tue, 19 Oct 2004 08:38:44 GMT
I don't use errors.(header|footer|prefix|suffix) and I don't have
brackets in my messages.

I use the following code to show the error messages:

In my action:

ActionMessages errors = new ActionMessages();
errors.add(ActionMessages.GLOBAL_MESSAGE,
   new ActionMessage("errors.username");
saveErrors(request, errors);

In my VM page:

$errors.username

How do I use the errors.(prefix|suffix)? In my properties file I have them as:

errors.prefix=<div class="red">
errors.suffix=</div>

But ErrorsTool doesn't pick them up.

Thanks.

On Tue, 19 Oct 2004 16:31:07 +0900, Shinobu Kawai
<shinobu.kawai@gmail.com> wrote:
> 
> Hi Ben,
> 
> 
> 
> > Why ErrorsTool outputs the square brackets on every error messages?
> > What can I do to ignore those square brackets?
> >
> > ErrorTool outputs:
> >
> > [Required field cannot be left blank.]
> >
> > I want:
> >
> > Required field cannot be left blank.
> Funny, my errors come out as is.  How are you showing your error
> messages?  Are you sure the brackets aren't in your messages?  And your
> errors.(header|footer|prefix|suffix) as well?
> 
> Best regards,
> -- Shinobu Kawai
> 
> --
> Shinobu Kawai <shinobu.kawai@gmail.com>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
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