That did the trick.  Thank you very much Iwao!

Ed

-----Original Message-----
From: Iwao AVE! [mailto:[email protected]] 
Sent: Friday, February 27, 2009 10:17 AM
To: Stripes Users List
Subject: Re: [Stripes-users] Multiple Field Errors, One Error Message

Hi Ed,

Assuming you're using Stripes 1.5, adding an empty error to a field
highlights the field but does not output any error message in the
<stripes:errors /> tag.

errors.add(indexedFieldName, new SimpleError(""));

Then you can add another error with a dummy field name.

errors.add("dummy", new SimpleError("This message is output only
once."));

HTH,
Iwao

on 09.2.27 11:25 PM Smith, Edward said the following:
> Hello,
> 
>    I have a situation with a form containing indexed fields (i.e. 
> item[0].number, item[1].number, etc) and for one specific custom 
> validation I want to highlight all the indexed error fields in red yet

> only show the corresponding error message once in the <stripes:errors>

> tag.  Right now the action bean code does a basic ValidationErrors 
> population which highlights all indexed fields in red as expected but 
> also replicates the error message in <stripes:errors>:
> 
> errors.add(indexedFieldName, new SimpleError(
>    "This message is replicated for each indexed field in error));
> 
>    Anyone have an idea on the best way to highlight all the indexed 
> error fields yet only show a single error message in <stripes:errors>?
> 
> Ed


------------------------------------------------------------------------
------
Open Source Business Conference (OSBC), March 24-25, 2009, San
Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the
Enterprise
-Strategies to boost innovation and cut costs with open source
participation
-Receive a $600 discount off the registration fee with the source code:
SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users



The information contained in this message and any attachments is intended only 
for the use of the individual or entity to which it is addressed, and may 
contain information that is PRIVILEGED, CONFIDENTIAL, and exempt from 
disclosure under applicable law.  If you are not the intended recipient, you 
are prohibited from copying, distributing, or using the information.  Please 
contact the sender immediately by return e-mail and delete the original message 
from your system.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to