You can add a card to your bean, for example:
private Map<String, Serializable> filterValues = new HashMap<>();
And bind the values to the map using the filterValue p:column attribute, for example:
<p:column headerText="Name" sortBy="#{item.name}" filterBy="#{item.name}" filterMatchMode="contains" filterValue="#{yourBean.filterValues['name']}"> <h:outputText value="#{item.name}" /> </p:column>
The advantage of this solution is that the values will be preserved when the table is updated.
source share