Reputation: 119
How can I iterate over an object of RowSetDynaClass using Struts 2 tags? The same can be achieved in Struts 1 by using 'logic:iterate' but how to do this in Struts 2?
I have the following code in Action Class:
RowSetDynaClass list = get the list
request.setAttribute("theList", list.getRows());
and on the jsp that i forward to from this Action i use the following code:
<s:iterator value="theList">
<s:property value="xyz"/>
</s:iterator>
This however does not work. I am using Struts 2 framework. So how do i iterate over this list..
Thanks. :)
Upvotes: 0
Views: 610
Reputation: 160311
Iterate over the RowSetDynaClass
's rows
(JSP EL), getRows()
(Java):
API docs are often helpful when trying to understand how to use a class.
Upvotes: 4