iterate an Array List in Struts2 -
i have list , reach entry in list other list. have list ready me, want display through jsp.
how iterate list return 1 more list.
any appreciated.
regards, senny
see: http://struts.apache.org/2.0.11/docs/iterator.html
following should work, not tested:
<s:iterator value="parentlist"> <s:iterator> <s:property/> <s:iterator> </s:iterator>
the inner iterator think should use current value pushed onto stack outer iterator. s2 property tag same.
if have more complicated nesting, add var property parent iterator value. value becomes name of pushed value inside iterator.
an example of this:
<s:iterator value="parentlist" var="referencedas"> <s:iterator value="referencedas"> <s:property/> <s:iterator> </s:iterator>
Comments
Post a Comment