Hi all,

I'm currently implementing a tree in a GWT application which shows a
large amout of data (hence the CellTree rather than the widget based
Tree) and which is loaded asynchronously via AsyncDataProvider.

The application has to modify the tree, i.e. add new nodes, update the
text of exiting nodes and remove nodes.
I haven't been able to find an appropriate API exposed by the CellTree
or its TreeViewModel that could help with traversing the tree or
modifying data. I have seen CellTreeNodeView or
CellTreeNodeView.TreeNode, but they are either not allowing
modification or have package only visibility. The posts I've found
were inconclusive.

My current work-around is to construct a parallel tree structure (by
extending TreeViewModel.DefaultNodeInfo) in the TreeViewModel to
provide appropriate methods. This is quite cumbersome and defies a bit
the purpose of a lightweight tree as most of this information is
already kept in GWT-internal classes.

>From this extended DefaultNodeInfo, I managed to update a tree node by
invoking display.setRowData() and appending a child via
display.setRowData() and display.setRowCount().

When trying to delete a node via setRowData() and setRowCount(), the
node gets removed, but the SingleSelectionModel attached to the
CellTree doesn't work anymore afterwards.

My questions are:
- What is the proposed way to modify a CellTree? I hope the GWT devs
have thought of it but I haven't found it.
- What is the correct way of updating a HasData display, especially
how can rows be removed?

Thanks for your help,
Thomas

-- 
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-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to