1 Reply Latest reply on Oct 3, 2011 7:48 PM by jaredmorgs

    Recursive PanelMenu in Richfaces 3.3.3

    sajanvraj

      Hi 

                  I am searching for the  recursive operation to be implemented in the panelmenu component of rich faces 3.3.3 with JSF 1.2. <rich:panelMenu/>

      Right now richfaces has only tree for recursive operation. Is there a similar way round for panelMenu?

       

      (EG)

      <rich:tree ajaxSubmitSelection="true" ajaxSingle="true"

      rightClickSelection="true" icon="/image/node.gif"

      iconLeaf="/image/node.gif" >

      <rich:recursiveTreeNodesAdaptor roots="#{treeMenuItem}" var="_rootNode"> <rich:treeNode> <h:outputText value="#{_rootNode.name}" /> </rich:treeNode>

      <rich:recursiveTreeNodesAdaptor           roots="#{_rootNode.children}"

      var="_childNode"                                                            nodes="#{_childNode.children}">

      <rich:treeNode><h:outputLink value="#{_childNode.location}"

      target="content">#{_childNode.name}</h:outputLink>

      </rich:treeNode>

      </rich:recursiveTreeNodesAdaptor>

      </rich:recursiveTreeNodesAdaptor>

      </rich:tree>

       

      Here treeMenuItem is the object of  CUSTOM class TreeMenuItem which has following structure.

       

      public class TreeMenuItem implements Serializable{ private static Map<Long, TreeMenuItem> catMap = new HashMap<Long,

      TreeMenuItem>( );

          private List<TreeMenuItem> children;

          private String location;

          private String name;

          private boolean toggle;

          private long id;

      }

       

       

      The above one is working fine, but i want to implement the same thing for panelmenu of richfaces using above TreeMenuItem.

       

      Any suggestions would be appreciated.

       

      Sajan