p:autoComplete force selection

UI Components for JSF
Post Reply
luisalves00
Posts: 71
Joined: 21 Feb 2011, 18:37

25 Feb 2011, 13:27

Hello,

I'm using a p:autoComplete with forceSelection="true" option...Its possible to get an alert message to the user saying that he has to pick a value from the list?
The field is cleared and the user might don't understand why.

best regrads,

munkee
Posts: 16
Joined: 24 Nov 2010, 13:29

25 Apr 2012, 12:34

Hi, We're having the same issue.

Did anyone solve this?

We don't want users saving anything that they want, only being able to search and select something that already exists in the autocomplete list.
The problem with using forceSelection="true" is when the user thinks what they have written is going to be saved; instead they are just saving a blank entry which they might not notice, if they go directly on to doing another task.

Ideally we need the Primefaces component to throw up a message telling the user to select from the list.

Any help with this?

We're using Primefaces 3.2
Using: Primefaces 3.4.1
JSF: 2.0
Deployment Server: Red Hat Enterprise Linux Server release 5.7 (Tikanga), Glassfish 3.2
Test Server: Windows 7, Glassfish 3.2

chrishj
Posts: 229
Joined: 11 Jul 2011, 21:58
Location: England, Lancashire
Contact:

25 Apr 2012, 14:12

If you add required="true" to the autocomplete then you can enforce entry and use requiredMessage to inform them.
PrimeReact: 9.6.0
NextJs: 13.4.12
Theme Apollo v9.0
Database pg 8.8.0
react-hook-form: 7.38.0

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 47 guests