Hi,
I am facing problem with lastButton of SimplePager. I have 3 pages in
celltable, Page size=11 (1 empty record + 10 records(with value)), Total
record=26.
I used CustomerPager by extending SimplePager.
In 1st attempt 1+10 records display in celltable : Next & Last page button
is enabled (First & Prev button disabled) which is correct. But LastPage
button not working... :( Dont know whats the issue...
Unexpected behavior:
@1 Last page button is working only when I visit to last page(3 page in my
case).
@2 Assume I am on 1st page n I moved to 2nd page(Total 3 pages in
celltable). that time all buttons are enabled which is correct. In this
case Last button is working but behave like Next Button
My GWT application integrated into one of our product so cant debug it from
client side.
May be index value is improper in setPage(int index) method from
AbstractPager
Code flow is as follows for Last button
*//From SimplePager
lastPage.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
lastPage();
}
});
@Override
public void lastPage() {
super.lastPage();
}
// From AbstractPager
/**
* Go to the last page.
*/
protected void lastPage() {
setPage(getPageCount() - 1);
}
protected void setPage(int index) {
if (display != null && (!isRangeLimited ||
!display.isRowCountExact() || hasPage(index))) {
// We don't use the local version of setPageStart because it would
// constrain the index, but the user probably wants to use absolute page
// indexes.
int pageSize = getPageSize();
display.setVisibleRange(pageSize * index, pageSize);
}
}*
or may be some conditions false from above code(from setPage())
actual record = 26 and 3 Empty record (1st Empty record/page)
May b problem with dataSize :|
How I can check number of pages based on the data size? ?
How can I solve this problem?
--
Best Regards,
Vaibhav
<http://about.me/vaibhavbhalke>
--
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.