I have a form which contains 0 .. n "blah" text boxes all of which need to
be validated for integer content on the server.  If the ith, the jth and the
kth elements fail validation, I would like to be able to present the error
message "Invalid Number Format" next to the appropriate "blah" text boxes.
My custom validation component is capable of tracking the index, but I don't
see support for indexing in ActionError, ActionErrors or in ErrorTag.  I am
wondering how this case is normally handled in Struts.

Currently, if I do:

<html:error property="blah"/> 

for each blah form element I would get the error message repeated for each
failure for each element.       
I need to be able to do something like the following:

<html:error property="blah" index="<%= i %>"/>

As a real world example, consider a "view cart" page in a typical ecom
application, in which a customer would set the quantity to zero to remove
one or more items from the cart.  Now imagine that this user fat fingers the
situation and enters something that is not a number in one of the quantity
text boxes.  Finally, imagine that I wanted to direct the user's attention
to the offending row of the table with a friendly message.

Thanks for any help,

Shawn.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to