Hi,
I have a page with a tree (af: tree) and checks (selectBooleanCheckbox) at the nodes of the tree.
<af:tree value="#{bindings.ArbolOperadoresIncidenciasNivel2ROView1.treeModel}"
var="node" styleClass="arbol-incidencias"
selectionListener="#{bindings.ArbolOperadoresIncidenciasNivel2ROView1.treeModel.makeCurrent}"
rowSelection="multiple" id="arbol_ope">
<af:clientAttribute name="Nombre" value="#{node.Nombre}"/>
<f:facet name="nodeStamp">
<af:group id="g1">
<af:switcher id="s4" facetName="#{node.TipoNodo}">
<f:facet name="LIN">
<af:group id="g16">
<af:image source="/imagenes/spacer_arbol_gris.gif"
shortDesc="spacer" id="image6"
rendered="#{node.TieneHijos == null}"
styleClass="capa-oculta-icono-nodo-hoja"/>
<af:selectBooleanCheckbox text="#{node.Nombre}"
valueChangeListener="#{gestionBean.pulsarCheckBox}"
autoSubmit="true" label="Label 7"
value="#{node.Seleccion}"
rendered="#{node.Nombre != null ? true: false}"
id="sbc8"/>
...
My problem is that by expanding the tree nodes function valuechangelistener runs (gestionBean.pulsarCheckBox). This function should only be executed when selected or deselected checkbox.
This makes my application is slow because the function is being executed as many times as there checkbox.
Can anybody help?
Thanks in advance