Force refresh of a CellTree?

359 views
Skip to first unread message

membersound

unread,
Jan 11, 2013, 4:09:11 PM1/11/13
to google-we...@googlegroups.com
Hi,

I have a CellTree where onSelection I change a specific element.
BUT if I reselect an element that was selected before, the changed value is NOT updated in the view. Only if I fold and unfold the tree I see the changed value visually.

Question: how can I fore the tree to refresh itself without having to fold/unfold it?

Alex opn

unread,
Jan 12, 2013, 2:27:43 PM1/12/13
to google-we...@googlegroups.com
ListDataProvider or AsyncDataProvider?

membersound

unread,
Jan 13, 2013, 5:52:08 PM1/13/13
to google-we...@googlegroups.com
ListDataProvider.


Alex opn

unread,
Jan 14, 2013, 1:43:06 PM1/14/13
to google-we...@googlegroups.com
Have you called yourDataProvider.refresh() after the value change?

Also the second answer from here could help: http://stackoverflow.com/questions/7239960/programatically-refresh-a-gwt-celltree

Am Sonntag, 13. Januar 2013 18:52:08 UTC+1 schrieb membersound:
ListDataProvider.


membersound

unread,
Jan 14, 2013, 3:00:51 PM1/14/13
to google-we...@googlegroups.com
Ok I now created a HashMap<MyItem, ListDataProvider<MyItem>> for holding a reference to all subItems, and the key is the parent item.

And for each refresh I first detect the subItem, get its parent, retrieve the subDataProvider from the HashMap using the parent, and then forcing the .refresh() on that particular subdata.

I feel that's lots of boilerplate, but could not find another way...
Reply all
Reply to author
Forward
0 new messages