asked
2013-05-30 11:14:23 +0800
joeyjoo 63 ● 1 I have a grid and I am setting the mold to "paging" and pageSize to 10. The page load around 13 record using AnnotateDataBinder and the paging component show correctly. However, when the data reset to empty, the grid redraw correctly but the paging still showing in the page with incorrect information.
This issue only happen in ZK ver 6.5.2, it is working fine in ZK ver 6.5.1.1. Is anyone facing the same issue ? Any solution to this ?
Here is the example code to re-produce the problem.
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" root="./rootCP"?>
<zk>
<window id="rootCP">
<zscript><![CDATA[
List data = new ArrayList();
data.add("10");
data.add("11");
data.add("12");
data.add("13");
data.add("14");
data.add("15");
data.add("16");
data.add("17");
data.add("18");
data.add("19");
data.add("20");
data.add("21");
data.add("22");
public void testMe() {
data.clear();
((DataBinder)rootCP.getAttribute("binder")).loadComponent(test);
}
]]>
</zscript>
<grid id="test" model="@{data }" mold="paging" pageSize="10">
<columns>
<column>Test</column>
</columns>
<rows>
<row self="@{each='item' }" value="@{item }">
<label value="@{item }"/>
</row>
</rows>
<foot>
<footer>xxxx</footer>
</foot>
</grid>
<button label="test" onClick="testMe()"/>
</window>
</zk>