Disable selection of some items from p:autocomplete's panel

UI Components for JSF
Post Reply
Aditya
Posts: 163
Joined: 16 Nov 2011, 20:19

17 Sep 2014, 20:32

I need to show certain item suggestions in the autocomplete panel but prevent some of them being selected. How could I achieve this behaviour. Thanks.

My requirement is exactly similar to this old question: http://forum.primefaces.org/viewtopic.php?f=3&t=25199


--
Using Primefaces 5.0
*****
Aditya

Using :
Primefaces 5.0 + Omnifaces 1.7 + Prettyfaces
JSF 2.2.2 -Myfaces
Tomcat 7.0.42

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

17 Sep 2014, 23:36

I think that if you use custom content, add a css class for disabled items, show them like disabled and on an ajax event complete, remove the click eventhandlers from the disabled items, you are done

raho
Posts: 27
Joined: 05 Feb 2016, 21:08

17 Aug 2022, 09:58

8 years later I have the same problem ;-)

But there is no complete event for autocomplete component or do you mean another event?
PF 12.0.4
WildFly 23.0.2.Final

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests