CellTree update after items values changed

47 views
Skip to first unread message

spiewko

unread,
Nov 19, 2010, 7:09:03 PM11/19/10
to Google Web Toolkit, stoignie...@gmail.com
I found it impossible to update CellTree view when needed. CellTree
not implements HasData<T> interface so can't be set as display for
DataProvider.

It looks like CellTree needs different approach than other cell
widgets. I would very helpful if someone could explain what is a
proper use of the DataProvider, CellTree in context of updating tree
view?

I so some posts with reference to AbstractDataProvider.updateRowData()
but don't understand how it can by used.

Best regards.

John LaBanca

unread,
Nov 20, 2010, 10:27:05 PM11/20/10
to google-we...@googlegroups.com, stoignie...@gmail.com
CellTree consists of a bunch of NodeInfos, each of which has its own DataProvider.  In order to use a CellTree, you need to create a TreeViewModel that creates NodeInfos (use DefaultNodeInfo) based on the value of the node that was just opened.  For example, if you open the top level node "Friends", TreeViewModel.getNodeInfo() will be passed "Friends".  You should return a DefaultNodeInfo that contains a list of friends.  DefaultNodeInfo takes a DataProvider in its constructor.

Thanks,
John LaBanca
jlab...@google.com



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


Reply all
Reply to author
Forward
0 new messages