1 Reply Latest reply on Jun 20, 2008 1:36 PM by djkrite

    Select node by clicking on node icon

    vladoseprak

      Hello,

      I have regular tree nodes with attached command links.

      <rich:treeNode id="testNode">
       <h:panelGrid id="panelGrid" columns="3" class="menuAction">
       <h:panelGroup id="panelGroup1" layout="block" styleClass="name_navigation1">
       <a4j:commandLink styleClass="#{nodeRecursive.styleClass}" action="#{nodeRecursive.processViewPage}" actionListener="#{nodeRecursive.processViewAction}"
      eventsQueue="generalQueue" reRender="rightPage,nodeInfo,pageReloadId">
       <h:outputText value="#{nodeRecursive.name}"/>
       </a4j:commandLink>
      </rich:treeNode>
      


      When i click on command link onSelect action is invoked (in tree back-bean). I want to achieve the same functionality when i click on node icon (folder/document icon). Current behavior is: when i click on node icon, focus changes but no action is invoked and i don't know how to attach action to node icon.

      Is there some simple way how to do this?

      Thanks for answers!

        • 1. Re: Select node by clicking on node icon
          djkrite

          i had a similiar problem. the way i got this to work was by putting a h:outputText component and a h:commandLink component with in the rich:treeNode component tags. on my backing logic i would decide to render one or the other. i also turned on toggleOnClick.