Tree selection getter

UI Components for JSF
Post Reply
devora
Posts: 11
Joined: 08 Jun 2010, 09:15

08 Jun 2010, 09:32

Hi!

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>
and my been is:

Code: Select all

public TreeNode[] getSelectedNodes() {
		return selectedNodes;
	}

	
	public void setSelectedNodes(TreeNode[] selectedNodes) {
		this.selectedNodes = selectedNodes;
	}
When I select some nodes and press submit, It goes nicely to the setter and the propery selectedNodes contains the selected nodes.
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?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Jun 2010, 11:32

It is not implemented yet.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests