-
Bug
-
Resolution: Fixed
-
Normal
-
7.0.5
-
None
-
Security Level: Jimmy
-
None
-
ZK 7.0.7
-
None
Steps to reproduce
- run attached zul
- click the button to clear the Grid
Actual Result
java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.get(ArrayList.java:324) at org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:156) at org.zkoss.zul.Grid$Renderer.render(Grid.java:1035) at org.zkoss.zul.Grid.renderItems(Grid.java:1144) at org.zkoss.zkmax.zul.impl.LiveGridDataLoader.loadModel(LiveGridDataLoader.java:211) at org.zkoss.zkmax.zul.impl.LiveGridDataLoader.syncModel(LiveGridDataLoader.java:165) at org.zkoss.zkmax.zul.impl.LiveGridDataLoader.doLiveListDataChange(LiveGridDataLoader.java:123) at org.zkoss.zkmax.zul.impl.LiveGridDataLoader.doListDataChange(LiveGridDataLoader.java:93) at org.zkoss.zul.Grid.onListDataChange(Grid.java:969) at org.zkoss.zul.Grid.access$1400(Grid.java:214) at org.zkoss.zul.Grid$2.onChange(Grid.java:733) at org.zkoss.zul.AbstractListModel.fireEvent(AbstractListModel.java:59) at org.zkoss.zul.ListModelList.clear(ListModelList.java:202)
Debug information
- Add multiple rows and set pageSize="1" also has this issue.
- _limit in LiveGridDataLoader becomes 1 and causes the error
Workaround
<custom-attributes org.zkoss.zul.grid.rod = "false"/>