My solution is not pretty, but it works.

// Build a list of already expanded nodes

Set<String> expandedNodes = new HashSet<String>();

TreeNode rootNode = tree.getRootTreeNode();

for (int i = 0; i < rootNode.getChildCount(); i++){

if (rootNode.isChildOpen(i)){

expandedNodes.add(rootNode.getChildValue(i));

}

}


// Data update logic goes here


// Expand previously expanded metaspaces

for (int i = 0; i < rootNode.getChildCount(); i++){

final String nodeName = (rootNode.getChildValue(i));

if (expandedNodes.contains(nodeName)){

rootNode.setChildOpen(i, true, false);

}

}


On Thursday, August 23, 2012 1:38:54 AM UTC-7, Alex opn wrote:
>
> You ever found a solution?
>
> Am Donnerstag, 31. Mai 2012 15:57:31 UTC+2 schrieb bogyom:
>>
>> Hi, 
>>
>> I'd like to implement a hiarachical task viewer with CellTree control. 
>> Task states are on the server side. The client shows the task tree and 
>> updates it say every 2 second. Each task has a progress info 
>> displayed. If a task finised it is removed from the tree. 
>>
>> The CellTree with async data procider works fine. My problem is how to 
>> do the 2 sec update preserving the mode open states? Right now I call 
>> updateRowData for the root this refreshes the tree but all node gets 
>> closed. 
>>
>> Any suggestions? 
>> Thanks 
>> Gyorgy
>
>

-- 
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/-/7Q2PIg2qhrMJ.
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