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