My Ui is like attached image
The problem what I am facing is On tree node selection my Backend bean is getting selected data but not updating right panel form with selected node data:
One another thing I have noticed that after node selection if I do a page refresh it's reflecting the selected node data
Details:
[1] I am working on a screen where employee and company are represented as a treeTable where company name is parent and employees are child node.
employeeList.xhtml:
<h:form id="employeeListForm">
<p:treeTable id="empTree" widgetVar="empTree"
value="#{employee.rootEmployeeNode}" var="item"
selection="#{employee.selectedEmployeeNode}"
selectionMode="single" rendered="#{employee.filteredEmployees== null}">
<p:ajax event="select" listener="#{employee.onEmployeeNodeSelect}"
update=":employeeEditForm">
</p:ajax>
<p:column headerText="#{o:translate('Name')}" priority="1">
<h:outputText value="#{item.name}" title="#{item.name}"></h:outputText>
</p:column>
<p:column headerText="#{o:translate('Description')}" priority="2">
<h:outputText value="#{item.description}" title="#{item.description}"></h:outputText>
</p:column>
</p:treeTable>
<h:form>
On selection of TreeNode I am displaying the employee details in the right panel which is employeeEditForm And my employeeEditForm.xhtml is:
<ui:composition ...>
<h:form id="employeeEditForm">
<!-- form components to display employee details -->
</h:form>
</ui:composition>
Note: Please help me to understand how to deal with this.