0

Paging problem

asked 2009-03-15 13:40:51 +0800

issamlaabidi gravatar image issamlaabidi
217 2

Hi,
i want to handel my listbox with paging so i put as this:

listbox.setMold("paging");
Paging page = listbox.getPagingChild();
page.setMold("os");
page.setTotalSize(10);
page.setPageSize(2);
redraw(0, PAGE_SIZE);

what i want to do is to put my paging to support 10 items but in effect for every request io fetch the suitable items fo the current page

final int PAGE_SIZE = 2;
page.addEventListener("onPaging", new EventListener() {
public void onEvent(Event event) {
PagingEvent pe = (PagingEvent) event;
int pgno = pe.getActivePage();
int ofs = pgno * PAGE_SIZE;
logger.info("the pageeeeeeeeeee is " + ofs);
// Redraw current paging
redraw(ofs, PAGE_SIZE);
}
});

the problem is that for my first load the paging is put to 1 it is if setTotalSize is ignored????? please help

delete flag offensive retag edit

5 Replies

Sort by » oldest newest

answered 2009-03-16 04:22:43 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi,

setTotalSize means that set the total items to the page, and setPageSize means that set the number of items per page.

/Jumper

link publish delete flag offensive edit

answered 2009-03-16 08:23:09 +0800

issamlaabidi gravatar image issamlaabidi
217 2

i know this but what i wanted to say is if i put:
Paging page = listbox.getPagingChild();
page.setMold("os");
page.setTotalSize(100);
it must make my paging supports 100 items even though i didn't fill all them. and this is used for perfermance of database. ,it means i indicate that a total i have 100 but for every time the client do paging i load the rests.

link publish delete flag offensive edit

answered 2009-03-16 09:25:03 +0800

issamlaabidi gravatar image issamlaabidi
217 2

Bon j'ai resolu le problème merci beaucoup.

link publish delete flag offensive edit

answered 2009-03-17 01:06:28 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

Hi,

I don't know why you need to load the rests.
In the paging event, you have only to load the items being displayed on current page.

/Jumper

link publish delete flag offensive edit

answered 2009-03-17 10:08:25 +0800

issamlaabidi gravatar image issamlaabidi
217 2

yes that what i have done all thanks

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-03-15 13:40:51 +0800

Seen: 219 times

Last updated: Mar 17 '09

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