Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I need a simple drop down list of numbers

 
Fletcher Munson
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm brain farting, but I can't seem to find a simple way to create a dropdown (select) list of just numbers. I know I can do this



But I want to do something like this:



Anyone have any ideas? I didn't want to have to create a special Bean (which is what the second code block uses). I just wanted to use Integer or something.

Thanks in advance,
Fletch
[ May 30, 2008: Message edited by: Fletcher Munson ]
 
Joe Ess
Bartender
Posts: 9370
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts 2 provides a slick way to do such a thing via OGNL:


I don't know of a Struts 1 equivalent, but that's not to say it can't be done. I'd probably just use a scriptlet or utility bean and move on to more important problems
[ May 30, 2008: Message edited by: Joe Ess ]
 
Fletcher Munson
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the answer. I actually am using Struts 1.3.8 (though we are "eventually" moving to 2). Maybe I'll have to try using logic:iterate
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this:

[ May 30, 2008: Message edited by: Merrill Higginson ]
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!