-
1. Re: <rich:tree> with checkbox
ilya_shaikovsky Dec 28, 2010 4:00 AM (in response to skrajath)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.
-
2. Re: <rich:tree> with checkbox
skrajath Dec 29, 2010 1:16 AM (in response to ilya_shaikovsky)Here in this tree child nodes of a parent node are got when clicked on parent node. Now i have just done like this
<rich:tree rightClickSelection="true"
nodeSelectListener="#{test.processNodeSelection}"
ajaxSubmitSelection="true" switchType="client"
value="#{test.root}" var="item"
icon="/atsapp/images/favorite#{item.node.loaded}.png"
iconLeaf="/atsapp/images/favorite#{item.node.loaded}.png"
oncontextmenu="true" reRender="tree"><rich:treeNode id="treeNode">
<h:outputText
value="#{item}" />
<h:selectBooleanCheckbox id="selectAll" >
<a4j:support event="onclick" reRender="tree" />
</h:selectBooleanCheckbox></rich:treeNode>
</rich: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.?
-
3. Re: <rich:tree> with checkbox
lobotomy Jan 5, 2011 7:00 PM (in response to skrajath)<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.