You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by P Cotton <mg...@dsl.pipex.com> on 2004/04/04 17:32:37 UTC
Validation errors displayed in reverse order
Hi everyone,
I am having problems with the order that validation errors are displayed
using Struts. I am using validation.xml and have a JSP page with a list of
form fields e.g.
Field1 Textbox
Field2 textbox
Field3 textbox
I can validate this fine and when forwarding back to the page, with ERROR, I
want to display an ordered bulleted list of all form errors. However at the
moment this bulleted list is displayed in reverse order. So if all three
textboxes were invalid the page would look like:-
Errors in page:-
- Field3 is not valid
- Field2 is not valid
- Field1 is not valid
Field1 Textbox
Field2 textbox
Field3 textbox
I would like to display multiple validation errors like this in the order
that the fields appear on the page. So my desired output would be:-
Errors in page:-
- Field1 is not valid
- Field2 is not valid
- Field3 is not valid
Field1 Textbox
Field2 textbox
Field3 textbox
And for this to scale up whether I had 3 form fields or 30. Please could
you point me in the direction for how I display multiple validation errors
in the order of fields, from first to last?
Any help is greatly appreciated.
Regards - Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation errors displayed in reverse order
Posted by Niall Pemberton <ni...@blueyonder.co.uk>.
Are the fields in this order in your validation.xml?
Niall
----- Original Message -----
From: "P Cotton" <mg...@dsl.pipex.com>
To: <us...@struts.apache.org>
Sent: Sunday, April 04, 2004 4:32 PM
Subject: Validation errors displayed in reverse order
> Hi everyone,
>
> I am having problems with the order that validation errors are displayed
> using Struts. I am using validation.xml and have a JSP page with a list
of
> form fields e.g.
>
> Field1 Textbox
> Field2 textbox
> Field3 textbox
>
> I can validate this fine and when forwarding back to the page, with ERROR,
I
> want to display an ordered bulleted list of all form errors. However at
the
> moment this bulleted list is displayed in reverse order. So if all three
> textboxes were invalid the page would look like:-
>
> Errors in page:-
> - Field3 is not valid
> - Field2 is not valid
> - Field1 is not valid
>
> Field1 Textbox
> Field2 textbox
> Field3 textbox
>
> I would like to display multiple validation errors like this in the order
> that the fields appear on the page. So my desired output would be:-
>
> Errors in page:-
> - Field1 is not valid
> - Field2 is not valid
> - Field3 is not valid
>
> Field1 Textbox
> Field2 textbox
> Field3 textbox
>
> And for this to scale up whether I had 3 form fields or 30. Please could
> you point me in the direction for how I display multiple validation errors
> in the order of fields, from first to last?
>
> Any help is greatly appreciated.
>
> Regards - Paul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Validation errors displayed in reverse order
Posted by Joe Germuska <Jo...@Germuska.com>.
At 4:32 PM +0100 4/4/04, P Cotton wrote:
>Hi everyone,
>
>I am having problems with the order that validation errors are displayed
>using Struts. I am using validation.xml and have a JSP page with a list of
>form fields e.g.
Is this the same as http://issues.apache.org/bugzilla/show_bug.cgi?id=27992 ?
If so, perhaps you can see if the provided patch works. I haven't
had time to check it out myself.
Then again, maybe your issue isn't the same.
Joe
--
Joe Germuska
Joe@Germuska.com
http://blog.germuska.com
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers, and
nobody thinks of complaining."
-- Jef Raskin
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org