0 Replies Latest reply on Oct 10, 2007 3:55 PM by Mike_Sear

    Rich:Tree node expansion problem with nested command links

    Mike_Sear Newbie

      Hi all,

      Test set-up:
      MyFaces 1.1.4
      Richfaces 3.1.0
      Tomcat server 5.0.28
      Java 1.5

      The problem description is as follows:
      I have a web page that consists of two frames - a menu frame on the left hand side (called 'menu frame') which contains a Rich Tree, and a larger details frame on the right (called 'infopane'). Its a classic menu details pattern - click on a node in the Rich Tree and a corresponding details page should be loaded into the 'infopane' frame opposite.

      The Rich Faces Tree is popoulated by a simple data model generated in a backing bean. Nested inside the Rich:Tree is a Rich:TreeNode, and nested inside the TreeNode is a command link (see code snippet below).

      <rich:tree id="rtree" style="width:300px" switchType="ajax" value="#{simpletreebean.treeNode}" ajaxSubmitSelection="false" var="item" nodeFace="#{item.type}">

      <rich:treeNode id="link" type="doc">
      <h:commandLink id="linkb" target="infopane" action="get_details" value="C:#{item.title}" />


      When the page loads I can navigate the tree without any problem, for example, expanding and collapsing the tree. When I click on a node which has a command link, the corresponding details page opens ok in the target infopane frame opposite. Now here is when I run into problems. After I select the node with a command link, I try to expand or collapse the tree, then the html page currently displayed in the 'infopane' frame is loaded into the 'menu frame' and replaces the rich:tree.

      Its as if when I expand a node, the tree makes a request to the server in order to load the next level of child nodes and the response from the server is the details page resulting from the last command link action.

      Its a bit of a long winded explanation but I wonder if anyone has had something similar.