4 Replies Latest reply on Jul 10, 2007 7:26 PM by vivian hu

    why do I have to click on a tree node twice?

    vivian hu Novice

      I have a tree, when a node is selected, I want to send the node id to my bean. I have the following code, but what I found is the first time I click on the node, it looks selected, but it didn't send the id over to bean, the second time I click on it, it works and send the value to my bean.

      Why is this happening?


       <rich:panel>
       <rich:tree style="width:300px"
       value="#{desktopBean.templateRoot}"
       var="item" nodeFace="leaf">
       <rich:treeNode type="leaf">
       <a4j:commandLink>
       <a4j:actionparam name="templatePath"
       value="#{item.id}"
       assignTo="#{desktopBean.templatePath}"
       noEscape="false"/>
       <h:outputText value="#{item.name}"/>
       </a4j:commandLink>
       </rich:treeNode>
       </rich:tree>
       </rich:panel>