You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by dg...@hotmail.com on 2009/11/05 07:59:54 UTC

inmethod datagrid and row additions and filtering

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/

Re: inmethod datagrid and row additions and filtering

Posted by Deren <dg...@hotmail.com>.
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/
> 

-- 
View this message in context: http://old.nabble.com/inmethod-datagrid-and-row-additions-and-filtering-tp26210072p26227374.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org