1 2 Previous Next 29 Replies Latest reply: Mar 5, 2008 12:40 PM by Max Laenzlinger RSS

TreeNode & selectBooleanCheckbox HOW-to ???

Krasimir Goutcev Apprentice

Hi Folks,
so, tell me how to create tree with chekbox. This was very simple wit Tomahowk but wit RICH face no anything how-to do that.

In the beginning i try this simple test:

<rich:tree value="#{tree1.firstTree}" var="node" nodeFace="simpleNode"
 id="tree1">
 <rich:treeNode type="simpleNode" id="treeNode1">

 <h:selectBooleanCheckbox value="true"/>


 </rich:treeNode>
 </rich:tree>

and in backing bean i have stupid method as:
public TreeNode getFirstTree() {
 firstTree=new TreeNodeImpl();
 firstTree.setData("a1");
 TreeNodeImpl child = new TreeNodeImpl() ;
 child.setData("a2");
 TreeNodeImpl child2 = new TreeNodeImpl() ;
 child2.setData("a3");
 firstTree.addChild(new Integer(1),child);
 firstTree.addChild(new Integer(2),child2);

 return firstTree;
 }


and now I have tree with two checkboxes but no way to check this boxes.
What is wrong???



1 2 Previous Next