0 Replies Latest reply on Aug 6, 2011 5:44 AM by iabughosh

    rich:tree select

    iabughosh Master

      dears,

      I'm using rich:tree rich:treeModelRecursiveAdaptor to build my tree, when i try to get the selected node it returns null,

       

      Env:

      RF 4, JSF 2.0.3, JBoss 6 final

       

      xhtml code :

       

       

            <h:form id="MTForm">

                  <h:outputText value="root"/>

                  <rich:tree id="rftree"

                             var="item"

                             nodeType="#{item.type}"                      

                             toggleType="ajax"

                             selectionType="ajax">

                      <rich:treeSelectionChangeListener listener="#{tree.treeSelectionChangeListener}"  />

                      <rich:treeModelRecursiveAdaptor roots="#{tree.rootNodes}" nodes="#{item.nodes}">                   

                          <rich:treeNode type="repository" title="he3" toggleListener="#{tree.treeToggleListener}">

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

                          </rich:treeNode>

                          <rich:treeModelAdaptor nodes="#{item.leafs}" leaf="true" >

                              <rich:treeNode type="repository" title="he3">

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

                              </rich:treeNode>

                          </rich:treeModelAdaptor>

                      </rich:treeModelRecursiveAdaptor>

                  </rich:tree>

              </h:form>

       

      selection Listener code :

      public void treeSelectionChangeListener(TreeSelectionChangeEvent tsce) {

       

              UITree source = (UITree)tsce.getSource();

              System.out.println(source.getRowData());

          }

       

      is this a bug ?

       

      regards.