I have the following code ( simplified ):
<p:tree value="#{treeBean.root}" var="node" filterBy="#{node.year}">
<p:treeNode>
<h:outputText value="#{node}"/>
</p:treeNode>
</p:tree>
With this solution I am able to filter the treenodes by year, but I am not satisfied in the way the input is requested. By default it's inputText and I do not see a way to change it. I want to have it in a way it's done here in year column ( https://www.primefaces.org/showcase-v8/ui/data/datatable/filter.xhtml ). But this solution does not work for tree filter.
Also, I have no control on the input type or placeholder.
Solution to my case was just implementing custom filter functionality using controller class. Took a while, but seems like that's the only adequate approach to have full control of the tree filter visual design.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.