我知道,可以在p:dataTable
中使用带有列的过滤器:
http://www.primefaces.org/showcase/ui/datatableFiltering.jsf
但是可以在p:treeTable
列中使用过滤器吗?
http://www.primefaces.org/showcase/ui/treeTableCheckbox.jsf
我的welcome.xhtml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h2="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>APP</title>
</h:head>
<h:body>
<h:form id="form">
<p:treeTable id="treeTable"
value="#{treeCheckBox.root}" var="manager"
selection="#{treeCheckBox.selectedNodes}" selectionMode="checkbox">
<p:column style="width:150px">
<f:facet name="header">
ID
</f:facet>
<h:outputText value="#{manager.id}"/>
</p:column>
<p:column style="width:100px">
<f:facet name="header">
Description
</f:facet>
<h:outputText value="#{manager.description}"/>
</p:column>
<p:column style="width:100px">
<f:facet name="header">
KnowledgeDate
</f:facet>
<h:outputText value="#{manager.knowledgeDate}"/>
</p:column>
</p:treeTable>
</h:form>
</h:body>
</html>