wood burning stoves 2.0*
The moose likes Struts and the fly likes I need a simple drop down list of numbers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "I need a simple drop down list of numbers" Watch "I need a simple drop down list of numbers" New topic
Author

I need a simple drop down list of numbers

Fletcher Munson
Ranch Hand

Joined: May 16, 2007
Posts: 31
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 ]

SCJP 5, SCWCD 1.4
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

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 ]

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Fletcher Munson
Ranch Hand

Joined: May 16, 2007
Posts: 31
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

Joined: Feb 15, 2005
Posts: 4864
Try this:

[ May 30, 2008: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I need a simple drop down list of numbers
 
Similar Threads
html:option not selected
How to make <html:select dynamic
Problem with dropdown list
Help me with Struts HTML tags
loop over html:select with JSP