I have a multi selection p:tree on my screen. my code is like this:
Code: Select all
<p:tree value="#{viewManagementBean.data}" var="node"
selectionMode="checkbox" selection="#{viewManagementBean.selectedNodes}"
propagateSelectionUp="true"
propagateSelectionDown="true" cache="false">
<p:treeNode >
<h:outputText value="{node}" />
</p:treeNode>
</p:tree>
Code: Select all
public TreeNode[] getSelectedNodes() {
return selectedNodes;
}
public void setSelectedNodes(TreeNode[] selectedNodes) {
this.selectedNodes = selectedNodes;
}
The point is that I need that certain nodes should be selected when the tree is first rendered, but the tree never goes to the selection getter!
I read a previous post in this subject, http://primefaces.prime.com.tr/forum/v ... il?id=505 .
It says there that it will be fixed in version 2.0.3, I downloaded the snapshot of this version, and it is still not fixed there.
Can you please help me?