PDA

View Full Version : PagingToolBar bug



caoimhin
11 Aug 2009, 10:26 AM
Hi, all

I add a WidgetListener to the Grid to detect if the pagingtoolbar needs to be rearranged, or to say changed dynamically. It works fine, but there is a bug occurred under the following conditions:

1. Maximize the window, and go to the last page.
2. Minimize the window, then the current page in my case changes to 5, but the total pages is 4, which is wrong.
15585

OR

1. Minimize the window, and go to the last page.
2. Maximize the window
15586

The Code is:


_folderList.addWidgetListener(new WidgetListener() {
@Override
public void widgetResized(final ComponentEvent ce) {
if (_toolBar != null) {
_toolBar.setPageSize((_folderList.getHeight() - 30) / 20);
_toolBar.refresh();
_toolBar.enable();
}
super.widgetResized(ce);
}
});


Can you fix this bug? Thanks!

sven
11 Aug 2009, 10:30 AM
Please read the bugforum guidelines. Moving this to the help forum for now.