Pour une liste à élément multiple, ton attribut correspondant dans l'ActionForm doit etre un tableau de String,
private String[] portefeuille = {};
puis dans ta jsp, une façon de faire est :
1 2 3 4 5 6
|
<html:select property="portefeuille" multiple="true">
<html:option value="choix1">Mon choix 1</html:option>
<html:option value="choix2">Mon choix 2</html:option>
<html:option value="choix3">Mon choix 3</html:option>
</html:select> |
Cela remplira ton tableau portefeuille :
portefeuille = {"choix1", "choix3"} si tu as selectionné 1 et 3.
Je ne suis pas sûr si ça marche mais peut etre que ça t'aidera
Partager