That should work,but your search method should only be called when the
command button is pressed, not when the tree is expanded. If your
action is being run on the node toggle, something is very wrong.
On 12/22/06, Marko Asplund <[EMAIL PROTECTED]> wrote:
On 2006-12-22, Andrew Robinson wrote:
> Why do you need to tell the difference? You should have a
> actionListener or action on your commandButton or commandLink
> components if you want to know if they have been clicked. The only
> other way is to override the tree toggle action method on the UITree
> object or set your own varTreeToggler (or whatever that attribute is
> called)
the relevant parts of my view look like this:
<h:commandButton id="myButton" action="#{bBean.search}"/>
<t:tree2 id="tree" value="#{bBean.tree}" var="node" clientSideToggle="false">
<f:facet name="document">
<h:outputText value="#{node.description}"/>
</f:facet>
</t:tree2>
Now, when a user clicks the command button, #{bBean.search} method
gets invoked but this also happens when the tree is expanded or
collapsed, which is why i'd like to be able to skip the search
operation, when the method gets invoked as a result of a tree
operation.
did i understand correctly, that i can have tree operations trigger a
different action method something like this:
<t:tree2 id="tree" varNodeToggler="#{bBean.handleTreeEvent}"
value="#{bBean.tree}" var="node" clientSideToggle="false">
?
Any ideas on why the tree doesn't work with client-side toggling enabled?