0 Replies Latest reply on Feb 23, 2011 7:45 AM by renzasso

    rich:treeNode how to avoid undesired AJAX events!

    renzasso

      Hello everybody!

       

        Well, these days I am facing a problem that until the moment I didn't find the solution. The case is, in my rich:tree, I dont use to use the changeExpandListener parameter to process some event while I expand the node. Nevertheless, I have noticed that some AJAX event has been processed when I expand the node. Is there a way to avoid It? I have noticed that because I use the a4j:status component to show a loading modalPanel while I process a nodeSelectListenerEvent.

       

      My rich:tree code:

       

      <a4j:region id="tree_region">

                      <rich:tree id="tree"

                      switchType="client"

                      value="#{treeBean.rootNode}"

                      var="item"

                      nodeFace="#{item.type}"

                      ajaxSubmitSelection="true"

                      nodeSelectListener="#{treeBean.processSelection}"

                      rendered="true"

                      immediate="true"

                      stateAdvisor="#{treeDemoStateAdvisor}">

                          <!-- Conta -->

                          <rich:treeNode type="conta" icon="imagens/tree_icon_ambiente.png" iconLeaf="imagens/tree_icon_ambiente.png" reRender="#{treeBean._informa_ids}">

                              <h:outputText value="#{item.name}"/>

                              <a4j:support disableDefault="true" event="onclick" reRender="#{treeBean._informa_ids}" immediate="true"></a4j:support>

                          </rich:treeNode>

                          <!-- Equipamento Fisico-->

                          <rich:treeNode type="equipamento" icon="imagens/tree_icon_porta.png" iconLeaf="imagens/tree_icon_porta.png" reRender="#{treeBean._informa_ids}">

                              <h:outputText value="#{item.name}"/>

                              <a4j:support  event="onclick" reRender="#{treeBean._informa_ids}" immediate="true"></a4j:support>

                          </rich:treeNode>

                          <!-- Portas -->

                          <rich:treeNode type="porta" icon="imagens/tree_icon_porta2.png" iconLeaf="imagens/tree_icon_porta2.png" reRender="#{treeBean._informa_ids}">

                              <h:outputText value="#{item.name}"/>

                              <a4j:support disableDefault="true" event="onclick" reRender="#{treeBean._informa_ids}"></a4j:support>

                          </rich:treeNode>

                      </rich:tree>

      </a4j:region>

       

      As you can see, I am not calling the changeExpandListener function.

      Could anyone give me a hand please?

       

      Thanks in advance!