struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Hardy <>
Subject Re: Order Validation Errors
Date Fri, 15 Feb 2002 17:33:38 GMT
I was just looking in the ActionErrors class myself and the ActionError objects are held in
a hashtable, which I think has no defined ordering system. 

The messages which go into the ActionError though can have up to five substitution snippets,
so you could put all your validation messages in order into one blank message with five substitutions:

in your


in your validation code:

                       new ActionError("error.blank.5bits",
                                       "error1", "error2", etc...));

Actually it might only be four that it can handle, not 5.


On Fri, 15 February 2002, Satish Jeejula wrote:

> Hello All,
> In a jsp page which had form with this order or elements.
> 1) Element A (required)
> 2) Element B (required)
> 3) Element C (not Required).
>   some more elements
> I submit the form with entering any data for the required fields.
> In my validation method of the form, I check for required fields in the same
> order as they are in the form and add them to Action Error class in that
> order. But when the errors are displayed back, the order of errors is not in
> the order in which I add them.
> I would like to know in what order the errors are sorted and displayed?
> thanks,
> Satish
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

Find the best deals on the web at AltaVista Shopping!

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message