I have the following tree2 (that is working... horray!) that is displayed based on a call to an ActionEvent:
 
<t:tree2
id="clientTree"
value="#{tbrowser.treeData}"
var="node"
varNodeToggler="t"
showRootNode="false"
rendered="#{tbrowser.displaytree}">
 
In my backing bean, I have the following code defined:
 
private boolean displaytree;
 
public boolean isDisplaytree() {
    return displaytree;
}
   
public void setDisplaytree(boolean _displaytree) {
    this.displaytree = _displaytree;
}
 
public void transTypeSelected(ActionEvent event) {
...
    this.displaytree = !this.displaytree;
    FacesContext.getCurrentInstance().renderResponse();
}
 
When I click on the h:commandButton:
 
<h:commandButton value="Search" actionListener="#{tbrowser.transTypeSelected}"/>
 
Everything displays as I expected.
 
The second time I click on the h:commandButton, I return an error "java.lang.IllegalArgumentException: Unable to locate facet with the name: index"; which basically breaks my TreeNodeBase:
 
TreeNode treeData = new TreeNodeBase("index", "Transactions", false);
 
I believe that after I set the displaytree value (rendered) to true then back to false, my Java tree code can't find the tree2 component.
 
Thoughts on how to fix this, do I just refresh the tree? How do I accomplish that?
 
Thanks,
 
--Todd

Reply via email to