Hi, I posted same question in another thread, but it is pretty much dead and no response so I'd try again here and try to simplify the question.
I have made a tree using recursiveTreeNodeAdapter and added a checkbox to each of the node. I d like when the checkbox is clicked, save the tree state and remember which checkboxes are checked, then re-render the tree using the stored state.
I have tried
<rich:tree id="myTree" style="width:300px" switchType="ajax" componentState="#{treeTest.treeState} stateVar="treeState"> <rich:recursiveTreeNodesAdaptor id="myTreeNodes" roots="#{treeTest.rootChildren}" var="item" nodes="#{item.children}"> <rich:treeNode id="myTreeNode"> <h:selectBooleanCheckbox id="checkbox" value="#{item.checked}"> <a4j:support event="onclick" reRender="myTree" action="#{item.processCheckBoxChanged}" /> </h:selectBooleanCheckbox> <h:outputText value="#{item.label}"/> </rich:treeNode> </rich:recursiveTreeNodesAdaptor> </rich:tree>