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

Community Driven Extensions Project
Post Reply
leacardenas
Posts: 30
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.

Melloware
Posts: 3717
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 Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

leacardenas
Posts: 30
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 4 guests