5 Replies Latest reply on Sep 25, 2007 1:51 PM by Yurii Kartsev

    recursiveTreeNodesAdaptor demo doesn't work

    Yurii Kartsev Apprentice

      Good afternoon, dear RichFaces gurus!

      I've started getting into rich:tree and the first example I've tried is - Recursive Tree Adaptor (http://livedemo.exadel.com/richfaces-demo/richfaces/treeNodesAdaptor.jsf)

      I've copied the sources from the page:


      Then I've added this in my faces-config.xml (like in 3.1.0 src):


      Then I've added this code to my xhtml-file:
       <ui:define name="tree">
       <rich:separator height="1" style="padding:10px" />
       <h:form id="employeesDataTable_form">
       <rich:tree style="width:300px" switchType="ajax" stateAdvisor="#{treeDemoStateAdvisor}">
       <rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
       <rich:separator height="1" style="padding:10px;" />

      And the result is no tree at all. Just free space for 400px.

      I've tried to debug FileSystemBean.getSourceRoots(), and there is a condition "if (srcRoots == null)" - it gives false. Maybe this is the reason? Because there is no defined constructor in FileSystemBean and there is no place where srcRoots equals null. Just definition: "private FileSystemNode[] srcRoots;".

      Definitely I'm doing something wrong, but what exactly?

      Thank you in advance.