I have a rich tree and it contains few nodes. I have a checkbox beside each node. When I check a checkbox , checkbox pertaining to all the children needs to be checked and when I uncheck all the children have to be unchecked. I have the below code in my xhtml. In the backing bean , I set all the children to checked / unchecked based on the event. The tree is initially in "collapsed" mode. When I click on the checkbox and expand the node , I can see all the children being checked. But when I uncheck / check in expanded mode , the values aren't getting reflected in the child elements. Can you please help in letting me know what I am missing? Thanks.
<rich:tree id="producttree" switchType="server"
value="#updateProductBean.deviceServiceTreeRoot}" var="item">
<rich:treeNode id="productnode">
<h:selectBooleanCheckbox value="#{item.selected}"
rendered="#{item.value == null && item.checkbox == true}"
valueChangeListener="#{updateProductBean.submitUpdateProduct}">
<f:attribute name="selectedProductId" id="selectedProductId"
value="#{item.paramID}" />
<f:attribute name="selectedProductName" id="selectedProductName"
value="#{item.name}" />
<a4j:support event="onclick" reRender="producttree,productnode">
</a4j:support>
</h:selectBooleanCheckbox>
<h:outputText value="#{item.name}" rendered="#{item.value == null}" />
</rich:treeNode>
</rich:tree>