struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Winterfeldt <dwinterfe...@yahoo.com>
Subject Re: Order Validation Errors
Date Fri, 15 Feb 2002 18:36:46 GMT
In the nightly builds the order is maintained in
ActionErrors.

David

--- Adam Hardy <adam_hardy@altavista.com> wrote:
> 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 ApplicationResources.properties:
> 
> error.blank.5bits={0}{1}{2}{3}{4}
> 
> in your validation code:
> 
> errors.add(ActionErrors.GLOBAL_ERROR,
>                        new
> ActionError("error.blank.5bits",
>                                        "error1",
> "error2", etc...));
> 
> 
> Actually it might only be four that it can handle,
> not 5.
> 
> Regards
> Adam
> 
> 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:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 
> 
> Find the best deals on the web at AltaVista
> Shopping!
> http://www.shopping.altavista.com
> 
> --
> To unsubscribe, e-mail:  
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message