I want to set multiple child nodes under same parent to be selected or check marked. I saw this answer: https://stackoverflow.com/a/17025086/1297935 and tried the following and it does not work:
@ManagedBean
@ViewScoped
public class BackingBean extends GenericViewBean {
private TreeNode[] selectedNodes;
public void showChildSelected(){
...
...
selectedNodes = new TreeNode[]{p1child1,p1child2}; //two child nodes of same parent added
...
...
for(TreeNode treeNode : selectedNodes){
treeNode.setSelected(true);
}
RequestContext.getCurrentInstance().update("listView:tree");
}
}
Above code only shows the last child selected / check marked. Is there any Solution to select multiple child nodes of the same parent from Managed Bean? Thanks in advance.