-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.8, 8.0.4
-
Security Level: Jimmy
-
None
-
None
Steps to Reproduce
run the attached example rod-list-remove.zul
scroll to the bottom of the listbox (ROD will load new items)
remove the last item (or any other item after ROD loaded a new block of listitems)
Actual Result
java.lang.NullPointerException at org.zkoss.zul.impl.ListboxDataLoader.syncModel0(ListboxDataLoader.java:351) at org.zkoss.zul.impl.ListboxDataLoader.syncModel(ListboxDataLoader.java:300) at org.zkoss.zkmax.zul.impl.LiveListboxDataLoader.syncModel(LiveListboxDataLoader.java:168) at org.zkoss.zkmax.zul.impl.LiveListboxDataLoader.doLiveListDataChange(LiveListboxDataLoader.java:130) at org.zkoss.zkmax.zul.impl.LiveListboxDataLoader.doListDataChange(LiveListboxDataLoader.java:98) at org.zkoss.zul.Listbox.onListDataChange(Listbox.java:2591) at org.zkoss.zul.Listbox.access$1000(Listbox.java:270) at org.zkoss.zul.Listbox$4.onChange(Listbox.java:481) at org.zkoss.zul.AbstractListModel.fireEvent(AbstractListModel.java:59) at org.zkoss.zul.ListModelList.remove(ListModelList.java:319) at org.zkoss.zul.ListModelList.remove(ListModelList.java:326)
Expected Result
remove the item without exception
Debug Info
The combination of org.zkoss.zul.listbox.rod="true" and calling renderAll() after setting the model causes this error.
Workaround
When using ROD don't call renderAll() or disable ROD (org.zkoss.zul.listbox.rod="false") for this listbox
- relates to
-
ZK-3693 NPE + IndexOutOfBoundsException when replacing a listitem
- Closed