0 Replies Latest reply on Nov 27, 2007 6:20 PM by Joe Sage

    Using a rich:tree on the left side of the page I'd like to l

    Joe Sage Newbie

      I'm developing a jsp using richfaces and I have a tree object on the right side of the page. When the user clicks on a leaf I want to 'dynamically' load a jsp (with supporting backer) on the right side of the page. I have seen many examples of this using text or html but I have not seen an example where a jsp is loaded.

      My code looks like this:

      (JSP code)
      <h:panelGrig columns="2" width="100%" columnClasses="col1,col2">
      <rich:tree style=width:300px" nodeSelectListener="{myBacker.processSelection}" reRender="detailPanel" ajaxSubmitSelection="true" switchType="client" value="#{myBacker.treeNode}" var="item">

      <a4j:outputPanel style="width:600px" ajaxRendered="true" layout="block">
      <h.outputLink id="detailPanel" value="#{myBacker.detailPanel}" />

      (Backer code)
      public void processSelection(NodeSelectedEvent event){
      UITree tree = (UITree) event.getComponent();

      I have a private attribute for detailPanel and set and get methods for this attribute.

      The detailPanel is initially loaded with a default page. However, when I click on a leaf (even though the processSelection is firing and the setDetailPanel and getDetailPanel are firing) The new "MyDetail.jsp" is not getting loaded the default page remains in the panel. There are no exceptions occurring.