Monday, December 9, 2013

Re: SingleSelectionModel with KeyProvider does not update selected object when data is refreshed

It checks for equality on a key of the objects.
 
David


On Sat, Dec 7, 2013 at 3:01 PM, Ümit Seren <uemit.seren@gmail.com> wrote:
How does your KeyProvider look like ? Do you check on object equality or do you check equality of an id/key of your objects ? 

On Friday, December 6, 2013 3:35:46 PM UTC+1, stuckagain wrote:
Hi,

I noticed an issue in the SingleSelectionModel when used in combination with a KeyProvider and updating the cell table with new data.

The idea is that I want to retain selection, and that seems to work. What does not work is when I use the getSelectedObject method I get an older version of the object instead of the refreshed version.
Is that the way it is supposed to work ? Wouldn't it be smarter to recalculate selection when the data in the table is updated ?

I currently implemented a workaround that uses the KeyProvider to find the item in the table that has the same key as the previous selection.

David

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate