I've been using Primefaces for months now and never had a big issue, but I haven't found a solution for this problem yet.
If i use p:ajax exspand update=@this or update=@form it corrupts my tree and only shows the Folders in the expanded Folder (See Images below).
If I use update=@none there is no issue.
Code: Select all
<o:form id="navForm" includeViewParams="true" >
<p:outputPanel id="navTreePan" style="width: 100%; height: 150px; overflow: auto; display: block;">
<p:tree id="tree" var="node" value="#{afsFolderService.root}" style="width: 99%; min-height: 145px;">
<p:treeNode type="all" expandedIcon="ui-icon-folder-open"
collapsedIcon="ui-icon-folder-collapsed">
<span style="cursor: pointer;"
onclick="this.parentNode.parentNode.firstChild.click();">
#{node.folderName}
</span>
</p:treeNode>
<p:treeNode type="afs-folder" expandedIcon="ui-icon-folder-open"
collapsedIcon="ui-icon-folder-collapsed">
<span style="cursor: pointer;"
onclick="this.parentNode.parentNode.firstChild.click();">
#{node}
</span>
</p:treeNode>
// More similar Types of TreeNode, which are currently unused
<p:treeNode type="system" rendered="false" />
<p:ajax event="expand" update="@form" process="@form" />
</p:tree>
</p:outputPanel>
</o:form>
After Click:
(The <span> still creates a 'pointer'-cursor, but clicking does not do anything
it just looks broken)
After Reload:
I want to use ajax to lazy load Elements from the Database with a listener in the Future.
(Because a certain Folderstructure is fixed, but the Elements below should be up to date, and it is best if they are only loaded when needed).
I would appreciate help