Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

for loop in select struts tag

 
garfild Baram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have the following code:
<html:select styleClass="drpdwn" property="activationTimeFrameStart" >
<html ption value="00">00</html ption>
<html ption value="01">01</html ption>
<html ption value="02">02</html ption>
...
...
<html ption value="10">10</html ption>
<\html:select>
It shows listbox 0f numbers between 00 - 10 or what ever I descide.
I need to use a loop for saving me the code (if I need let say 60 option values).
How can I do it?
Thanks
Jo
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34371
345
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the <logic:iterate> tag.
ps - Next time use the code tags to avoid getting the icons.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ps - Next time use the code tags to avoid getting the icons.
This is generally a good idea, but for short excerpts it's also a good idea to check the "Disable smilies in this post." box below the list of little faces.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Struts forum.
 
garfild Baram
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys for your advise.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic