Primefaces Filter By a specific value
In Primefaces datatable, it can filter a specific column by the following code:
<p:column style="text-align: center;"
headerText="Name"
sortBy="#{Name}"
filterBy="#{Name}" id="NameColumn">
<h:outputText id="Name"
value="#{formResultsRow.Name}" />
</p:column>
The code above will generate a filter on the header of the column. and we can filter a particular value by entering the text in that filter.
Actual Result-
Header Field
Name
Mark
Mark
Mark
Mark
David
David
David
Desired Result-
What I'm looking for is a filter or a way that will produce a desired output without entering the value in the filter field. Or setting default value in primefaces datatable.
Desired output
Mark
Mark
Mark
Mark