Hi, I'm working with the rich:Tree component to implement a tree that has checkboxes to allow certain business logic. I would like to execute a diferent event when the node is selected than when the checkbox is selected. For example:
<rich:tree id="arbolOficinas" value="#{relacionEmpresaController.oficinasTree}" var="node" toggleType="client" selectionChangeListener="#{relacionEmpresaController.onOficinaNodeSelect}"> <a4j:ajax event="selectionchange" execute="arbolOficinas" render="arbolAgenciasPanel" /> <rich:treeNode> <h:outputText value="#{node.oficina.label}" /> <h:selectBooleanCheckbox value="#{node.oficina.checked}"> <a4j:ajax event="change" execute="arbolOficinas" listener="#{relacionEmpresaController.oficinaCheckedChangedListener}"> </a4j:ajax> </h:selectBooleanCheckbox> </rich:treeNode> </rich:tree>
As you can see I have a listener for selectionChange, and then another for BooleanCheckbox change event. The problem is that when I select the checkbox directly, the selectionchange event of the tree is fired automatically. Is there any way to override this behaviour, and accomplish what I need, or I should find another solution?. Thanks a lot.