• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts2 - <s:iterator> in two-Dimensional Array.

 
Paul Michael Serrano
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,

I would like to ask how am I going to extract the data object from my 2-dimensional array using <s:iterator>?

In my action class, I do have....


And in my jsp,

what should be the values of my second <s:iterator> tag?
 
Ankit Garg
Sheriff
Posts: 9597
36
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think id attribute is depricated. You should try this



I think you don't need to give anything in the value attribute i.e. remove the value attribute altogether and still it will work as the inner iterator will iterate over the 1-D array that is placed on the top of the value stack by the outer iterator...
 
Paul Michael Serrano
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ankit.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!