View Full Version : [CLOSED] PagingToolBar, change page size
ushkinaz
5 May 2008, 8:41 AM
toolbar.setPageSize(10);
toolbar.setActivePage(0);
toolbar.setPageSize(20);
toolbar.setActivePage(0);
Last call does nothing while it should reload the page.
darrellmeyer
13 May 2008, 9:28 AM
setActivePage expects the page number, not the index. I have changed the docs to:
"Sets the active page (1 to page count inclusive)."
ushkinaz
13 May 2008, 9:37 AM
Does it make difference regarding this bug report? =) I think not.
darrellmeyer
13 May 2008, 9:51 AM
Did you look at the code?
if (page != activePage && page > 0 && page <= pages) {
loader.load(--page * pageSize, pageSize);
} else {
pageText.setText(String.valueOf((int) activePage));
}
page has to be > than 0. Am I missing something?
ushkinaz
13 May 2008, 1:48 PM
Yes, you are. Change 0 to anything else and the bug is still there.
The problem is not in (page > 0) check it is (page != activePage).
If I change page size, setting active page to anything, including same page index as it was before, should reload that page. In my humble opinion =)
An example
I have 100 items: "1", "2", "3" ... so on.
Page size is 2. setActivePage(2) shows items (3,4).
Then I setPageSize(3) and setActivePage(2) again. It should show (4,5,6), but it shows (3,4)
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.