0 Replies Latest reply on Feb 24, 2012 10:51 AM by mohisham

    RichFaces tree problem


      Hello all,


      I am new to RichFaces, and I have a problem which i have been struggling for a couple of weeks.  I have a page where I have to render multiple rich:trees.  Each tree can be huge, and the problem is that the nodes can be coming from any place (I am browsing file systems, which could be anywhere, so over ftp/sftp/local etc.).


      The trees work fine most of the time.  However, if I click on a node which has thousands of children, this tends to slow things down immensely.  And, not only does browsing this tree slow down, if I click on another tree node, even that takes a long (LONG) time to render (specifically, to expand any node). 


      My question is, why are the other trees affected from this?  It seems like, upon expansion, richfaces is recreating the object model everytime for all trees.  Any way to stop this from happening?


      Here is a sample code of my tree.  Any suggestions/help appreciated!


      <ui:repeat var="node" value="#{browserAction.repNodes}">
                  <rich:tree switchType="ajax" eventsQueue="repositoryBrowserQueue" status="doNothing" var="newNode" value="#{fileSystemTree.get(node)}" ignoreDupResponses="true" >
                           <rich:treeNode eventsQueue="repositoryBrowserQueue" ignoreDupResponses="true" changeExpandListener="#{filesystemTree.processExpansion}">
                                  <a4j:commandLink value="#{newNode.name}"
                                                       action="#{browserAction.treeNodeClicked(newNode.object, newNode.repNode)}"
                                                       reRender="mainArea" immediate="true" 
                                                              eventsQueue="repositoryBrowserQueue" status="doNothing"