# Revision history [back]

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.

Greetz chillchill.

Hey Senti.

As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

Greetz chill.

Hey Senti.

As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

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.

As you can see I set the totalPages also to a calculated field.
Then the paging element will not go into error.

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