Revision history [back]

click to hide/show revision 1
initial version

answered 2015-01-31 06:36:45 +0800

chillworld gravatar image chillworld flag of Belgium

https://github.com/chillw...

The paging element has a property activepage. Bind it to your VM and set it correct. Sorry for bad styling but I'm working with phone.

Greetz chill

The paging element has a property activepage. Bind it to your VM and set it correct. Sorry for bad styling but I'm working with phone.Hey Senti.

Could this fiddle help you out?

http://zkfiddle.org/sample/2j8njg9/1-setPaging-in-aftercompose

Greetz chillchill.

Hey Senti.

Could this fiddle help you out?
As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

http://zkfiddle.org/sample/2j8njg9/1-setPaging-in-aftercompose

Greetz chill.

Hey Senti.

Could this fiddle help you out?
As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

http://zkfiddle.org/sample/2j8njg9/1-setPaging-in-aftercompose

Greetz chill.

Edit :

Oke I see the problem. Try this :

this.pageSize = FHSessionUtil.getDesktopHeight() - 1;
activePage = this.searchClaim.getActivePage();
totalSize = (activePage + 1) * pageSize;
this.selectedClaim = null;
pageination.setTotalSize(totalSize);
pageination.setActivePage(activePage);
fetchRecord();
fetchTotals();

Hey Senti.

Could this fiddle help you out?
As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

http://zkfiddle.org/sample/2j8njg9/1-setPaging-in-aftercompose

Greetz chill.

Edit :

Oke I see the problem. Try this :

this.pageSize = FHSessionUtil.getDesktopHeight() - 1;
activePage = this.searchClaim.getActivePage();
totalSize = (activePage + 1) * pageSize;
this.selectedClaim = null;
pageination.setTotalSize(totalSize);
pageination.setActivePage(activePage);
fetchRecord();
fetchTotals();

Edit2 :

Senti,

Now let us dig deeper. Copy the Page class and put it in your project (same FQN)
Class can be found here : https://github.com/zkoss/zk/blob/master/zul/src/org/zkoss/zul/Paging.java

Now, in the setActivePage put at the first line a logging for the totalsize.
I'm pretty sure the total size isn't what it should be but, beter to know what we get.

Greetz chill.

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More