I have a tree where I switch the model based on new
searches. It seems eventually (almost intermittently) the tree gets out of
whack with the underlying model and the expandAll, collapseAll stops working. I have a workaround that works. Every new search, I kill the
tree and create a new one. Is there another way to notify a tree2 that a model changed
so that expandAll, and collapseAll always works? private void loadQuickOrgData() { List employees =
myOrgDirectDataProducer.list(); buildEmployeeObjectHierarchy(employees,
true); myOrgTreeModel =
(org.apache.myfaces.custom.tree2.TreeModel)
tree2ModelBuilder.createTreeModelFromList(employees); if (this.myOrgTreeComponent!=null){ myOrgTreeComponent = new
org.apache.myfaces.custom.tree2.HtmlTree(); } } My hack is this…. if (this.myOrgTreeComponent!=null){ myOrgTreeComponent = new
org.apache.myfaces.custom.tree2.HtmlTree(); } The urgency is really low since I have a workaround. --Rick |