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

Grid in paging mold doesn't change pages count

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 6.5.4
    • 6.5.3
    • Components
    • Security Level: Jimmy
    • None

      The same issue with: http://tracker.zkoss.org/browse/ZK-1601

      https://github.com/zkoss/zk/commit/113e764a2d960a2c134a1c1309bf29897c947dce

      <zk>
      	<zscript><![CDATA[ 
      
      		ArrayList data = new ArrayList();
      		for (int i = 1; i <= 42; i++) {
      			data.add("Data " + i);
      		}
      
      		ListModel dataModel = new SimpleListModel(data);
      	 ]]></zscript>
      	<grid id="grid" mold="paging"
      		pageSize="10" model="${dataModel}" activePage="4">
      		<custom-attributes org.zkoss.zul.grid.rod="false"/>
      		<columns>
      			<column value="Data"/>
      		</columns>
      	</grid>
      
      	<button id="button" label="Clear">
      		<attribute name="onClick"><![CDATA[ 
      
      			ArrayList data = new ArrayList();
      
      			ListModel dataModel = new SimpleListModel(data);
      			grid.setModel(dataModel);
      			System.out.println("size: " + grid.getPaginal().getTotalSize());
      		 ]]></attribute>
      	</button>
      </zk>
      

            jumperchen jumperchen
            jimmyshiau jimmyshiau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: