On Thursday, April 5, 2012 8:54:03 AM UTC+2, vaibhav gwt wrote: > > I want to render large tree dynamically so I selected CellTree widget. > I also want to know How CellTree widget supports DataBinding,
CellTree, like all Cell widgets, is *based* on databinding (unless you don't have the same definition for databinding as me) > Sorting & filtering etc.. ? > It doesn't support those features, but your model (TreeViewModel) can (most likely using a *decorator* pattern around you *real* TreeViewModel). The hardest part is to fire the appropriate events so that the CellTree re-renders your tree with the updated model. I've implemented a live outline of a rich-text editor (as soon as you add/remove a heading, the outline tree updates; same if you change the heading level; and if you type in the heading, the corresponding tree item updates with the new heading text). In my case, I used ListDataProviders within DefaultTreeNodes, and to update the tree I simply replace the whole list (ListDataProvider#setList). When an element has changed –but not the structure of the list– (e.g. when a heading's text changes), then I get the parent node's children list and call setList with the same value, it'll redraw the children of the parent node, so will redraw our updated node (along with all its sibling; it could probably be optimized, but nobody reported any performance issue yet; we also do that because our list is unmodifiable, so we cannot simply set() the item on the list to update that one heading). -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qcr8xykJX7sJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
