I have an <o:tree>
where i am displaying list of persons and each person what it has children and every child what it have children where the level of children is not known
The data is displayed correctly but the displayed node is an <h:commandLink>
where its action is a java bean function
Snippet of java code :
public class PersonController{
//class Person having List of children
//some code
public void readChild(double childId){
}
//some code
}
Snippet of jsf code :
<o:tree>
<o:treeNodeItem>
<ui:repeat var="person" value="#{personController.person}">
#{person.id}
<ui:repeat var="child" value="#{person.children}">
<h:commandLink value="#{child.id}" action="#{personController.readChild(child.id)}"/>
</ui:repeat>
</ui:repeat>
</o:treeNodeItem>
</o:tree>
Rendered page :
--person : 1
----child : 1.1
----child : 1.2
--person : 2
----child : 2.1
----child : 2.2
The main problem is that #{personController.readChild(child.id)}
id child 1.1 is clicked the parameted double childId
is sent 2.2 where any child is clicked the last parameter is sent where in case all values are displayed correctly
I send a paramater
f:param
instead of the parameter send by the functionIn this way the id is send properly by every node
Snippet of java code :
Snippet of jsf code :