-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
yesterday we found a curious behaviour by softwaretest and i've no idea how to solve.
maybe a bug ?
I put 30 rows in a grid with paging component (pagesize 10) go to the third page (element 20-29 are shown), now i clear the grid and
fill in 20 elements. The grid shows elements 0-9 the (in fact the first page) but pageing component is on side 2 and i cannot navigate.
Every time you move to the last page and refill the grid with a smaller number of rows the issue can be reproduced.
Any idea, what's going wrong ?
Version/Browser: ZK5.04PE, IE6,7,8,FF
Zul File for testcase:
<?page title="TestCase/Paging" contentType="text/html;charset=UTF-8"?> <zk> <window title="TestCase/Paging" border="normal" width="400px"> <vbox> <button width="100px" label="Fill30" onClick="fill(30)" /> <button width="100px" label="Fill20" onClick="fill(20)" /> <grid id="tblDemo" fixedLayout="true" onCreate="self.setPaginal(pg)" pagingPosition="bottom" width="300px" height="400px" mold="paging" > <columns> <column id="tblDemoCol1" label="Number" width="280px"/> </columns> <rows></rows> </grid> <paging id="pg" autohide="true" pageSize="10" detailed="true"/> </vbox> <zscript language="Java"><![CDATA[ void fill(int nCount){ clearGrid(tblDemo); Rows rows = tblDemo.getRows(); for (int i = 0; i<nCount; i++){ Row row = new Row(); Label l = new Label(Integer.toString(i)); row.appendChild(l); rows.appendChild(row); } } public void clearGrid(Grid grid){ Rows rows = grid.getRows(); List myList = rows.getChildren(); int y = myList.size(); for(int f=y-1 ; f>=0 ; f--){ AbstractComponent comp = (AbstractComponent)myList.get(f); rows.removeChild(comp); } } ]]> </zscript> </window> </zk>
Best regards,
Jörg
i test the code you provide on the ZK Sandbox,
and post a bug on the sourceforge
The tracker
https://sourceforge.net/tracker/?func=detail&aid=3082093&group_id=152762&atid=785191
Asked: 2010-10-06 03:27:35 +0800
Seen: 237 times
Last updated: Oct 06 '10