我想在datatable上实现全局过滤:
<p:dataTable id="dataTable" var="myVars" value="#{myBean.vars}" widgetVar="varsTable"
emptyMessage="Empty" filteredValue="#{myBean.filteredVars}">
<f:facet name="header">
<p:outputPanel>
<h:outputText value="Search all fields:" />
<p:inputText id="globalFilter" onkeyup="varsTable.filter()" style="width:150px" />
</p:outputPanel>
</f:facet>
<p:column filterBy="#{myBean.id}"
filterMatchMode="contains"
filterStyleClass="filter_hide">
<h:outputText value="#{myBean.id}" />
</p:column>
myBean:
private List<Vars> filteredVars;
// getter & setter
但是当我在inputText中写任何字母时,我收到了这个错误:
could not resolve property: globalFilter of: Vars
你知道为什么我会收到这个错误吗?