-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello, I have a severe problem which apprears when I use a binding between combo and list box
exemple
combobox id="combo" model="@{salaries}" selectedItem="@{selectedSal}" value="@{selectedSal.matricule}" buttonVisible="false" sclass="MyCSS" onSelect="onSelection()" height="20px">
<comboitem self="@{each=order}" label= "@{order.matricule}" value="@{order.matricule}" sclass="MyComboItem"/>
</combobox><
salaries is mymodel
the onSelection method is
void onSelection(){
List salariesList = (List)salariesListbox.getModel();
salariesList.clear();
salariesList.addAll(salariesCTRL.getSalariesList(selectedSal.getMatricule()));
}
and finally my list box is like this
<a:bind model="salaries" selectedItem="selectedSal"/>
<listbox mold="paging" width="680px" sclass="MyListBox" id="salariesListbox" >
<listhead sizable="true" >
<listheader label="Code Erreur" width="100px" ></listheader>
<listheader label="Matricule du salariƩ"></listheader>
<listheader label="Nom du salariƩ"></listheader>
</listhead>
<a:bind _var="salaries" />
<listitem context="editPopup" style="height:28px" >
<a:bind label="salaries.code_erreur" />
<listcell draggable = "paper" />
<a:bind label="salaries.matricule" />
<listcell draggable = "paper" />
<a:bind label="salaries.nom" />
<listcell draggable = "paper" />
</listitem>
</listbox>
The first filtering is works fine but when i want to re-filtering I have this exception
>> java.lang.IndexOutOfBoundsException: Index: 10, Size: 1
>> at java.util.ArrayList.RangeCheck(Unknown Source)
>> at java.util.ArrayList.get(Unknown Source)
>> at org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:145)
>> at org.zkoss.zkplus.databind.SelectedComboitemConverter.coerceToBean(SelectedComboitemConverter.java:63)
>> at org.zkoss.zkplus.databind.Binding.getAttributeValues(Binding.java:394)
>> at org.zkoss.zkplus.databind.Binding.access$000(Binding.java:48)
>> at org.zkoss.zkplus.databind.Binding$SaveEventListener.onEvent(Binding.java:529)
>> at org.zkoss.zk.ui.impl.EventProcessor.process0(EventProcessor.java:170)
Can some body help me, it very urgent
Thanks a lot
Asked: 2009-06-11 07:29:12 +0800
Seen: 202 times
Last updated: Jun 11 '09