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

grid sort failed with paging mold

XMLWordPrintable

      Grid sort failed with paging mold. The issue happened in CE and EE without ROD.
      Steps to reproduce the issue:
      1. click grid header one time (see name1 to name5)
      2. click next page (should see name6 to name9 but actually see name5 to name8)
      The issue only happen once, the result will be correct in all other operation after step2.
      sample zul

      <zk>
      	<zscript><![CDATA[
      	import org.zkoss.zul.*;
      	public class Person{
      		private String name;
      		public String getName() {
      		return this.name;
      		}
      		public void setName(String name) {
      		this.name = name;
      		}
      	}
      	List list = new ArrayList();
      	for (int i = 1; i < 10; i++) {
      		Person p = new Person();
      		p.setName("name" + i);
      		list.add(p);
      	}
      	ListModelList listModel = new ListModelList(list);
      	RowRenderer rowRender = new RowRenderer() {
      		public void render(Row row, Object data) throws Exception {
      			Person p = (Person) data;
      			new Label(p.getName()).setParent(row);
      		}
      	}
      	]]></zscript>
      	<window border="normal" title="">
      		<grid id="grid" mold="paging" pageSize="5" model="${listModel}" rowRenderer="${rowRender}">
      			<columns>
      				<column label="name" sort="auto(name)" />
      			</columns>
      		</grid>
      	</window>
      </zk>
      

            SimonPai SimonPai
            vincentjian vincentjian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: