I have a <o:tree> where I show a list of people and each person, that he has children and every child, that he has children, where the level of children is unknown
The data is displayed correctly, but the displayed node is <h:commandLink> , where its action is a java bean function
Java code snippet:
public class PersonController{
Jsf code snippet:
<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>
Page displayed:
--person : 1 ----child : 1.1 ----child : 1.2 --person : 2 ----child : 2.1 ----child : 2.2
The main problem is that when you press #{personController.readChild(child.id)} id child 1.1, a parameterized double childId sent 2.2, where any child element is clicked, the last one is transmitted when, in case all values ββare displayed correctly
source share