Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes problem laying out element of ordered list with logic iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "problem laying out element of ordered list with logic iterate" Watch "problem laying out element of ordered list with logic iterate" New topic
Author

problem laying out element of ordered list with logic iterate

dav mrazek
Ranch Hand

Joined: Aug 11, 2007
Posts: 69
Hello, i have a list of 8 String in session and i would like to have it display using logic iterate tag in this manner :

Hope someone helps, thank you.
dav mrazek
Ranch Hand

Joined: Aug 11, 2007
Posts: 69
Here is one solution if someone has better please post code thank you :
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Here's one way to do it:

The above assumes an indexed getter in the TestForm class:

[ October 15, 2007: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: problem laying out element of ordered list with logic iterate
 
Similar Threads
Struts 2 iterate over a Map
Struts logic iterate problems
Iterating using forEach
Struts logic iterate problems
logic:iterate issue