myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand, Shawn R" <shawn.bertr...@tycoelectronics.com>
Subject [Trinidad] Setting initial expanded state in tree
Date Tue, 08 May 2007 16:35:47 GMT
I'd like to set the initial expanded state in my tree such that only the
top-level root node is expanded.  In my case, there is only one root
node and it may have one or more child nodes.

 

I thought the following would do it, but the second call to getKeySet()
on the PathSet object returns null:

 

// Collapse all nodes

CoreTree tree = getTree();

tree.getTreeState().getKeySet().clear();

 

// Add the first (top-level) node to the current path 

ArrayList<String> path = new ArrayList<String>();

path.add(new String("0"));

tree.getTreeState().getKeySet().add(path);

 

What is wrong with this technique?

 

Thanks in advance,

 

Shawn Bertrand

Tyco Electronics

 

 


Mime
View raw message