Hi,
I have text fields with names as amount[0], amount[1] etc which are loaded in a map in the action class. Trying to display error messages next to each field rather than showing all at the top using
the code below but it is not working. If I just use fielderror tag then I can display all errors at the top of the jsp, but would like to display the error messages next to each field. What is the
right way to accomplish this?
When adding field errors adding the error as below.
addFieldError("amount["+ rowNumber + "]", getText("error.enter.amount"));
Then trying to display the error in the jsp using the below tag. loop is the
status var for s:iterator.
<s:fielderror fieldName="amount[%{#loop.index}]"/>
Below tag is displaying all field errors as if I am using <s:fielderror/>
<s:fielderror > <param value="amount[%{#loop.index}]"/> </s:fielderror>
Thanks,
Prasanth