Yes, I am using SimplePager.
If it's the SimplePager's fault of going to 14-23 instead of 21-23
(which is indeed non intuitively),
then there's still a bug, because going back one page from that point
causes all kinds of wierdness:
the range becomes 4-13, but the data is incorrect.
Thanks for looking at it for GWT 2.2.1 :)
Op 02-11-10 18:54, John LaBanca schreef:
Are you using a SimplePager? The pager isn't setting the page range
intuitively, and a lot of users have been complaining. We'll take
another look for GWT 2.1.1.
Thanks,
John LaBanca
[email protected]
<mailto:[email protected]>
On Tue, Nov 2, 2010 at 6:17 AM, Geoffrey De Smet
<[email protected]
<mailto:[email protected]>> wrote:
Hi,
I am using AsyncDataProvider and in my testcase I have 3 pages:
* First page: 1 to 10, renders correctly as 1-10 of 23
* Second page: 11 to 20, renders correctly as 11-20 of 23
* Last page: 21 to 23, *renders wrong as 14-23 of 23 instead
of 21-23 of 23*
o The data is messed up
o Going back to the second page messes up the second
page too
I checked the start and pageSizes being send to the server for the
last page: they are correct.
I do 2 things in my server callback:
* updateRowCount((int) result.getTotal(), true);
o Removing that line fixes the problem, but then it
reports 21-23 of /above/ 23
+ The tutorials recommend of setting the row count
* updateRowData(start, result.getRowList());
Here's the full code:
AsyncDataProvider<TableDataRow> dataProvider = new
AsyncDataProvider<TableDataRow>() {
protected void onRangeChanged(HasData<TableDataRow> display) {
final int start = pager.getPage() * pageSize;
server.loadData(start, pageSize,
new GenericCallback<TableDataResult>() {
public void onSuccess(TableDataResult result) {
*updateRowCount((int) result.getTotal(), true);* // Without this
line it works perfect, with it it doesn't on the last page
updateRowData(start, result.getRowList());
}
});
}
};
--
With kind regards,
Geoffrey De Smet
--
You received this message because you are subscribed to the Google
Groups "Google Web Toolkit" group.
To post to this group, send email to
[email protected]
<mailto:[email protected]>.
To unsubscribe from this group, send email to
[email protected]
<mailto:google-web-toolkit%[email protected]>.
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google
Groups "Google Web Toolkit" group.
To post to this group, send email to
[email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.
--
With kind regards,
Geoffrey De Smet
--
You received this message because you are subscribed to the Google Groups "Google
Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.