just a quick guess:

-try to remove the renderResponse()
-use immidate="true" on the commandButton, which is invoking your actionListener

On 6/9/06, Todd Patrick <[EMAIL PROTECTED]> wrote:


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


--
Matthias Wessendorf
Aechterhoek 18
48282 Emsdetten
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com

Reply via email to