0

Severe Problem binding combobox-ListBox

asked 2009-06-11 07:29:12 +0800

hamroune gravatar image hamroune
60

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

delete flag offensive retag edit
Be the first one to reply this discussion!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-06-11 07:29:12 +0800

Seen: 202 times

Last updated: Jun 11 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More