Please keep this on the list....
I'm not at the machine with my source (so this is from memory).
Basically I created my own tree state object that looks something like:
public class MyTreeState extends TreeStateBase {
@Override
public boolean isNodeExpanded(String node_id){
return true;
}
}
On the TreeModelBase, after you have added your nodes, call the setState
method and pass it a new instance of this class.
The tree will be expanded (and the user will not have the option of
collapsing any of the nodes). In the GUI, I also removed the tree
icons/lines so there isn't a visual clue that the tree can be
expanded/collapsed.
For my specific use case, this works pretty well.
Chris....
Chrisi wrote:
Hi Chris,
you wrote:
... work around for my specific case (I expand all nodes all the time
and
don't let the user collapse).
Can you please tell me how you did this.
I tried something like this in my getTreeData method:
HtmlTree _tree = (HtmlTree)
FacesContext.getCurrentInstance().getViewRoot().findComponent("myTree");
_tree.exandAll();
I always get an outofMemory.....
Thanks and Greetings
Chrisi
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.7.1/347 - Release Date: 5/24/2006