I'm not sure what you really want to achieve, but:
You use two functions of the tree component.
- Select checkbox (multiple)
- Context menu on nodes
Using both functions at the same time is not supported by bt. Whenever you right-click on a node, a context menu appears, then the node is selected / deselected. The context menu is not displayed if you go beyond the node (the background of the container or between nodes)
If you need a single contextMenu for the entire tree (e.g. Select All, Unselect All, Select any ...), just remove the attribute for in contextMenu:
instead:
<p:contextMenu id="contextSearch" for="treeClassifier">
just write
<p:contextMenu id="contextSearch">
Thus, contextMenu appears wherever you right-click on the container ( p:column in your case).
source share