I was able to solve this issue by defining a new class that extends 
LoadableDetachableModel.  The class also overrides hashcode and equals 
appropriately.  Now my List<IModel<T>> (used by RefreshingView) contains 
instances for the new detachable model implementation and now list manipulation 
works just fine and my manual row reordering logic works perfectly.


Regards,
J.D.
-----Original Message-----
From: Corbin, James [mailto:jcor...@iqnavigator.com] 
Sent: Wednesday, June 01, 2011 8:56 AM
To: users@wicket.apache.org
Subject: RefreshingView - Comparing Items in List Model

I am using a RefreshingView for a fairly simple table layout with the exception 
that one of columns in the table contains actions to move rows up and down 
(e.g., re-order rows).

My model for the RefreshingView is basically a List<IModel<T>> where T is my 
POJO.

The approach I was going to take was to have the buttons (move up/down) 
manipulate the underlying model by repositioning the IModel<T> instances in the 
ordered List.  In order to do this, I need to identify the index position of a 
particular item (IModel<T>) in the list.

My T instances have equals and hashcode defined, but wondered if my IModel<T> 
instances need to be detachable models that also define hashcode and equals as 
well.

Is this the right approach?

J.D.



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

Reply via email to