>> Since after validation fails the iterator grid also empty

I think, you need separate the field names by list index -- since your
data model is a list--,
to indicate which [textfield] should be captured by which POJO element.





And also, you need separate the field name of validation error, to
indicate POJO element it belongs.

So, i think code should likes:

JSP:
<s:iterator values="myList" status="rowStatus">
  <s:textfield name="myList[#rowStatus.index].name" />
  <s:fielderror name="myList[#rowStatus.index].name" />
</s:iterator>

Validation:
addFieldError("myList[index].name",getText("error.code"));

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to