0
votes

I would like to use the "setter" function from the "filteredValue" property from the Data Table (PrimeFaces) to apply custom filtering logic... The problem is that the setter function always receives a null value and, if I use the value collection to filter, the filter operation isnt reflected in the datatable !.

publiv void setFilteredOrg(List filteredOrg) {
       // filteredOrg always null
       // I apply custom filtering against the value
       return the filtered collection but the UI isnt filtered
}

Hope I make myself understood; I fear of pasting the code... But I can see if its confusing...

1
A void method does not return anything. Please increase your chances of being understood and getting useful help by editing your question to provide a minimal reproducible exampleSelaron
If you want to apply custom filter logic, I'd personally go for a lazy datamodelKukeltje
Selaron I know a void method doesnt return anything; I did the post really really fast...Agustn Ernesto Cardeilhac Bans

1 Answers

0
votes

in your column use filterMatchMode='custom' and filterFunction='customFilter'

customFilter is a javascript function that you defined

function customFilter(itemLabel, filterValue) {
     //return true to accept and false to reject
}