This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How work with iterator?

 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,

I need help with Struts2 iterator.

Here is my code




Forcycle gives picture and list gives describe of that picture. I need to have on one line Picture1 and describe1. At other line Picture2 describe2, etc. But i don't know how to do it.

I thing I need use IF (if line of sponsorList == numberOfRun) and in iterator I need to write something like "get propesties of that line (in my mind something like <s:property value="nameSponsor.get(numberOfRun)"/>)

I hope explain of my problem is sufficient.

Do anybody know how to do it?

thank you very much
 
Honzak Troubak
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem resolved, here is solution:

 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My advice would be to avoid scriptlets (java code) in JSP's. JSP's should only deal with display logic. Other programming tasks should be taken care of in an action or business logic class.
JSP Best Practices
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic