Bonjour,
J'ai un problème lors de l'affichage de la sélection des valeurs insérées dans une table de la BD dans une ManyListBox
Au niveau JFS:
Au niveau Beans:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 <ice:selectManyListbox binding="#beans1.selectManyListBoxFM}" id="selectManyListBoxFM" size="5" style="text-align: LEFT" value="#{beans1.defaultSelectedData12.selectedItems}"> <f:selectItems binding="#beans1.selectManyListBoxFMItems}" id="selectManyListBoxFMItems" value="#{beans1.selectManyListBoxDefaultItems12}"/> </ice:selectManyListbox>
Mais rien ne s'affiche lors de l'exécution.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 CachedRowSetXImpl getFMRowSet = new CachedRowSetXImpl(); getFMRowSet = new CachedRowSetXImpl(); getFMRowSet.setDataSourceName(SessionBean1.DATA_SOURCE_NAME); getFMRowSet.setCommand("SELECT * " + "FROM Table1 " + "WHERE ANNEE = "+this.annee+ " AND Code = "+this.code); getFMRowSet.setTableName("Table1"); getFMRowSet.execute(); ArrayList<String> AList_Fmarquant=new ArrayList <String>(); while (getFMRowSet.next()){ AList_Fmarquant.add(getFMRowSet.getString("CODE_FM")); } String[] List_FMarquant=new String[AList_Fmarquant.size()]; this.defaultSelectedData12.setSelectedItems(AList_Fmarquant.toArray(List_FMarquant));
Ma liste est définie par un code et un libellé.
Merci d'avance.
Partager