| Author |
How to populate values inside a dropdown box
|
Adarsh Raj
Greenhorn
Joined: Mar 18, 2009
Posts: 5
|
|
I'm a beginner in struts. i want to know how to populate values inside a dropdown box(<html:select>).
I've already created the necessary action forms, action and model classes. I can retrieve values from the database and also i can see that the values present inside the form's action form. But i don't know how to show these values from the action form to a jsp page.
I'm using struts tag in jsp/view components. My code is like this
ActionForm
Jsp code
Adz
|
 |
Ankit Garg
Saloon Keeper
Joined: Aug 03, 2008
Posts: 9189
|
|
|
I'm not very good at struts 1.x, so I can point you to what I think should be the solution. Try to use the html:optionsCollection tag inside the html:select tag...
|
SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
|
 |
Siva Masilamani
Ranch Hand
Joined: Sep 19, 2008
Posts: 377
|
|
You can try this
|
SCJP 6,SCWCD 5,SCBCD 5
Failure is not an option.
|
 |
Adarsh Raj
Greenhorn
Joined: Mar 18, 2009
Posts: 5
|
|
|
Thanks Siva. That helped
|
 |
 |
|
|
subject: How to populate values inside a dropdown box
|
|
|