1 Reply Latest reply on Aug 17, 2009 5:08 AM by Nick Belaevski

    How to select node of tree with rich:recursiveTreeNodesAdapt

    ZJ DA Newbie

      Hi, When I use org.richfaces.model.TreeNode for a tree, I can select a node on the server:

      ListRowKey<Long> rowKey = (ListRowKey<Long>) uiTree.getTreeNodeRowKey(aNode);
      treeState.setSelected(rowKey);
      


      However, when I try to use the similar method for rich:recursiveTreeNodesAdaptor, I get the following error:


      java.lang.UnsupportedOperationException
      at org.richfaces.model.AbstractTreeDataModel.getTreeNodeRowKey(AbstractTreeDataModel.java:148)
      at org.richfaces.component.UITree.getTreeNodeRowKey(UITree.java:1081)
      at org.richfaces.component.UITree.getTreeNodeRowKey(UITree.java:1072)
      ...


      How to get the rowKey for rich:recursiveTreeNodesAdaptor? Or is there any different way to select a node on the server?

      Thanks,
      -ZJ