2011/4/18 GJT <taulant.gju...@helvetic.com>

> Hi there
>
> I started using the Inmethod DataGrid because I need resizable tables and I
> need to be able to select multi entries.
>
> First, I had the problem that I couldn't select all entries and the multi
> select didin't work properly. In this forum I found out that I have to
> implement hashCode in the model. After that it worked, but the grid didn't
> refresh anymore after I had changed the model.
>
> To sum up, if I use the hashCode, I the table doesn't refresh after I
> change
> the model. If I don't use hashCode, the selection doesn't work properly.
>
> The code for hashCode() and equals I'm using:
>
>      public int hashCode() {
>         return new Long(id).hashCode();
>      }
>
>      public boolean equals(final Object obj) {
>         if (obj == this) {
>            return true;
>         } else if (obj == null) {
>            return false;
>         } else if (obj instanceof DetachableModel) {
>            DetachableModel other = (DetachableModel) obj;
>            return other.id == this.id;
>         }
>         return false;
>      }
>
> Thanks for your help.
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-Reload-Grid-tp3456685p3456685.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
Hi

Which version are you using (1.4 or 1.5)? What do you mean the grid does not
refresh?

I suggest
examining inmethod-grid-examples (com.inmethod.grid.examples.pages.datagrid
package) which seems to work fine.

Attila

Reply via email to