Does this work:

  | <f:view>
  |     <h:form>
  |             <rich:panel header="Tree">
  |                     <rich:tree value="#{treebean.tree}" var="node">
  |                             <rich:treeNode>
  |                                     <h:outputText value="#{node}"/>
  |                             </rich:treeNode>
  |                     </rich:tree>
  |             </rich:panel>
  |     </h:form>
  | </f:view>
  | 


  | @Name("treebean")
  | @Scope(ScopeType.SESSION)
  | public class TreeBean  {
  |     private TreeNode tree = new TreeNodeImpl();
  | 
  |     @Create
  |     public void createTree() {
  |             TreeNodeImpl fooNode = new TreeNodeImpl();
  |             fooNode.setData("foo!");
  |             TreeNodeImpl barNode = new TreeNodeImpl();
  |             barNode.setData("bar!");
  |             TreeNodeImpl tarNode = new TreeNodeImpl();
  |             tarNode.setData("tar!");
  |             tree.addChild("foo", fooNode);
  |             fooNode.addChild("bar", barNode);
  |             barNode.addChild("tar", tarNode);
  |     }
  |     
  |     
  |     public TreeNode getTree() {
  |             return tree;
  |     }
  | 
  |     public void setTree(TreeNode tree) {
  |             this.tree = tree;
  |     }
  |     
  | }
  | 

It has a simple string as node data and uses strings for ids

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4116672#4116672

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4116672
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to