File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes edit page html:select multiple= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "edit page html:select multiple="true"" Watch "edit page html:select multiple="true"" New topic

edit page html:select multiple="true"

ameya n

Joined: May 14, 2007
Posts: 17
i have an add page ......with list ( html:select hultiple="true" ) while adding i select multiple values develop the edit page .......i want to preselect more than one values from the list can i implement this in struts ?
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
I assume your action form has something like an array that holds the value of the selected items. In the action that shows your page you just need to populate this array on your form with the values you want selected.

- Brent
ameya n

Joined: May 14, 2007
Posts: 17
yes the previous action contains array which holds the values .....and also action form has such array
It is sorta covered in the JavaRanch Style Guide.
subject: edit page html:select multiple="true"
Similar Threads
/html:select multiple="true"/ problem while editing page
html:select multiple="true"
How to retain value in multiple select box
how to use list box in struts and how to retrive values in edit page
struts select list question