Is it possible to have a selectOneMenu filter with multiple words?

Community Driven Extensions Project
Post Reply
leacardenas
Posts: 29
Joined: 24 Aug 2016, 18:52

18 Sep 2017, 20:19

I want to know, if it is possible to have the component p:selectOneMenu of primefaces with a filter that works by filtering several words.

Similar to how p:chips works.

So I add several words and the filter will go filtering by the data that contains all of the words that I add to the list.

User avatar
Melloware
Posts: 762
Joined: 22 Apr 2013, 15:48

18 Sep 2017, 20:24

I don't think so out of the box but what you could do is use a custom filterFunction like...

filterFunction="#{mycontroller.filterFunction}"

Where you took all the strings from the filter and did your own custom search. So you could do something like "dog cat" and in your custom filter function split on space and search for dog and cat keywords etc.
PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 6.2.10 / PF Extensions 6.2.9

leacardenas
Posts: 29
Joined: 24 Aug 2016, 18:52

23 Sep 2017, 02:46

Perfect, thank you. I will try it.

Post Reply

Return to “Extensions”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest