Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 Iterate tag not getting the customed format

 
kajal mukergi
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends

I have to get data in following format

Name, Number - button

but the struts iterate tag is giving me night mare

In java



In JSP



and result is



[max, AAAA, DDD, TTT, NNN, CCCC, PP, 111, 2222, 3333, 4444, 55555, 6666, 77777]


but i need in this format

max 111
aaaa 22222
ddd 3333
.
.
.

can any one tell me how to get this type of format


 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I hesitate to tell you this, since in my opinion it's the wrong way to do it, see the merge tag.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that I think about it, that's actually not going to help much. It'd be easier, and much, much cleaner, to just do it right. Pass a list of objects, each containing the two elements you want to display on the same line.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic