I ended up making the following changes to the inmethod datagrid in order to get the correct behavior:
AbstractPageableView.java:
+ public void reset() {
+ realItemCount = UNKOWN_COUNT;
+ maxFirstItemReached = 0;
+ queryResult = null;
+ cachedPageCount = -1;
+ currentPageFirstItem = 0;
+ }
DataGridBody.java:
+ void reset() {
+ getData().reset();
+ }
DataGrid.java:
+ protected void onModelChanged() {
+ super.onModelChanged();
+ getBody().reset();
+ }
Deren wrote:
What is the best way to handle an IDataSource backed by a list that might change in total size or in contents (add/remove items and filter items)? I have seen cases where the most recently added item is missing (corrected after a refresh), where only the last item is displayed (e.g., one row displayed but 1-8 of 8 in the footer -- also corrected after a refresh), and where no items are displayed after a page refresh.
Thanks.
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/