Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3012

IndexOutOfBoundsException when rendering a grid

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 7.0.7
    • Freshly, 7.0.7
    • Components
    • Security Level: Jimmy
    • None

      <zk>
      <grid id="mygrid"/>
      <zscript><![CDATA[
      	ListModelList mymodel = new ListModelList();
      	mymodel.add("aaa");
      	mymodel.add("bbb");
      	mymodel.add("ccc");
      	mymodel.add("ddd");
      	mygrid.setModel(mymodel);
      	mymodel.remove("ddd");
      ]]></zscript>
      </zk>
      
      java.lang.IndexOutOfBoundsException: Index: 3, Size: 3
      	at java.util.ArrayList.rangeCheck(ArrayList.java:653)
      	at java.util.ArrayList.get(ArrayList.java:429)
      	at org.zkoss.zul.ListModelList.getElementAt(ListModelList.java:156)
      	at org.zkoss.zul.Grid$Renderer.render(Grid.java:1039)
      	at org.zkoss.zul.Grid.doInitRenderer(Grid.java:926)
      	at org.zkoss.zul.Grid.onInitRender(Grid.java:884)
      

            DevChu DevChu
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: