I tried this exact thing today and had the same results.. no update

grid.markAllItemsDirty();
grid.update();

I have a feeling that the equals method has to return false when objects are 
updated to force a redisplay. For this reason I'm guessing that the equality 
should not be solely based on the object's database id because that doesn't 
change when the object is updated. 

Perhaps we could include the object's version number in the equality test as 
well, which will change when the object is updated (version is automatically 
managed by our ORM but probably same across most ORMs).

In our case we use JDO so I'm guessing if we add an extra comparison to the 
equals method we might get the update working as expected eg.,


boolean 
equals(Object obj)
{
   ....

   if ( !JDOHelper.getVersion(this).equals(JDOHelper.getVersion(obj) )
     return false;

   ....
}


Hmmm, I'll try that first thing tomorrow morning when I hit the office.

>-----Original Message-----
>From: Attila Király [mailto:kiralyattila...@gmail.com]
>Sent: Tuesday, 19 April 2011 3:26 AM
>To: users@wicket.apache.org
>Subject: Re: Inmethod Grid Select All or Reload Grid
>
>Can you provide a minimal example webapp showing the problem?
>
>Attila
>
>2011/4/18 GJT <taulant.gju...@helvetic.com>
>
>> After debugging, I found out the with the hashCode method, the columns
>> don't
>> load. If I take out the hashCode method, the columns loads the data
>again.
>> But as I said, the selection doesn't work anymore.
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Inmethod-Grid-Select-All-or-
>Reload-Grid-tp3456685p3457355.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
>>
>>

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

Reply via email to