just add a4j:support to the checkbox and in its action get all children of current object and set checked as true. then rerender tree.
Here in this tree child nodes of a parent node are got when clicked on parent node. Now i have just done like this
<h:selectBooleanCheckbox id="selectAll" >
<a4j:support event="onclick" reRender="tree" />
So checkboxes are coming for all nodes and all child nodes when they are invoked.
But when i check on root node checkbox, how to know which node i checked ? and how to check all children under it.?
<a4j:support event="onclick" reRender="tree" /> should have some action method if you want to use it for this purpose and check all coresponding nodes(to the node that was chcecked) in that method. than rerender entire tree like it was said above.