0 Replies Latest reply on Feb 27, 2008 1:38 AM by Bibin B

    rich:tree and a4j:include integration problem

    Bibin B Newbie

      I want to update a portion of my page based on the selection made on a rich:tree that is within the same page.But I am finding some problem with my code

      I have a nodeselectionListener on my tree,which identifies which node has been selected according to its type,set a bean property which is the value of dynamic viewId
      Node selection listener and viewId property

      public void processSelection(NodeSelectedEvent event) {
       UITree tree = (UITree) event.getComponent();
       String selectedNodeType=((CustomerTreeNode)tree.getTreeNode()).getType();
      public String getCurrentDynamicView(){
       System.out.println("inside current dynamic view");
       System.out.println("Value is server");
       return "/pages/includes/customer-server-edit.jspx";
       System.out.println("value is details");
       return "/pages/includes/customer-info-edit.jspx";
       System.out.println("Something else");
       return "/pages/includes/customer-info-edit.jspx";

      this is my a4j:include part

      <a4j:include id="test" viewId="#{customerTree.currentDynamicView}"/>

      I have given 'test' in the reRender list of rich:tree

      So when I select one of the node,say server node,it changes the view in the a4j:include part,but when I switch back to the old view by selecting the default node,Im getting a javascript error (Unknown rutime error).Please help me with this issue