Please consider an example of a tree of rich persons:
<rich:tree switchType="ajax">
<rich:treeNodesAdaptor id="officeNodeAdaptor" nodes="#{officesBean.offices}" var="office" >
<rich:treeNode changeExpandListener="#{office.loadEmplyeesIfNeeded}" >
<h:outputText value="#{office.name}" />
</rich:treeNode>
<rich:treeNodesAdaptor id="employeeNodeAdaptor" nodes="#{office.employees}" var="employee">
<rich:treeNode>
<h:outputText value="#{employee.name}" />
</rich:treeNode>
</rich:treeNodesAdaptor>
This is an example tree for representing the data structure "Offices โ Employees". I want emplyees to load in a lazy way - that's why I introduced loadEmplyeesIfNeeded expand listener. Everything works well, except for one. Employees load after expanding the office node. Therefore, when a tree is displayed, all offices have no employee and are displayed as leaves. And, of course, the leaves cannot be expanded ....
To make a long store short. Is there a way to establish that a node should appear as a node (expandable) despite having no children? It would be best if rich: treeNode had some attribute, for example isNode, but it is not.
b.t.w. , . ...
.