[Possible Bug] Open p:autoComplete dropdown doesn't close on button click

UI Components for JSF
Post Reply
lastresort
Posts: 18
Joined: 07 Nov 2016, 11:14

11 Dec 2018, 13:09

I'm not sure if it is a bug, so I want to clearify that in the forum first.

Behaviour:

1. Open the p:autoComplete dropdown either by typing or clicking on the button.
2. Click on the dropdown button.
3. Dropdown closes but directly reopens.


For me the expected behaviour would be the same as for the p:selectOneMenu:

1. Open the p:autoComplete dropdown either by typing or clicking on the button.
2. Click on the dropdown button.
3. Dropdown closes

You can easily reproduce it in the showcase: http://www.primefaces.org:8080/showcase ... lete.xhtml
And see what I expect in the showcase too: http://www.primefaces.org:8080/showcase ... Menu.xhtml

Tested with PrimeFaces Elite 6.2.12 on Thorntail 2.0.2
PF Elite 8.0.1 + PF Extensions 8.0.2 + MyFaces 2.3-next-M2 @ Quarkus 1.4.2.Final

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

11 Dec 2018, 17:17

I tend to agree with you the behavior should be consistent.
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

Betlista
Posts: 48
Joined: 05 Apr 2018, 09:51

12 Dec 2018, 09:54

...and there is one more thing to consider when I typed "a" in showcase and clicked again on dropdown button, instead of "a0, a1, ..." it shown "0, 1, ..."

All this should consider also "forceSelection" option.

lastresort
Posts: 18
Joined: 07 Nov 2016, 11:14

12 Dec 2018, 10:26

Betlista wrote:
12 Dec 2018, 09:54
...and there is one more thing to consider when I typed "a" in showcase and clicked again on dropdown button, instead of "a0, a1, ..." it shown "0, 1, ..."
That's configurable.

dropdownMode: "Specifies the behavior dropdown button. Default "blank" mode sends an empty string and "current" mode sends the input value."

Source: https://www.primefaces.org/docs/vdl/6.2.9/core/
PF Elite 8.0.1 + PF Extensions 8.0.2 + MyFaces 2.3-next-M2 @ Quarkus 1.4.2.Final

Betlista
Posts: 48
Joined: 05 Apr 2018, 09:51

12 Dec 2018, 12:04

lastresort wrote:
12 Dec 2018, 10:26
That's configurable.
Oh thanks! So far I didn't check all options, but this one might solve some of my problems ;-)

Betlista
Posts: 48
Joined: 05 Apr 2018, 09:51

12 Dec 2018, 12:50

I tested: Let say I have regions ("Europe", "Americas", ...) .. when I type "eu" in (options are filtered to "Europe") and click on button the value is not used (very likely because it was not submitted), it is removed instead. I'm afraid this is more complex problem, when POJOs (with converter and so on) are used... I tried immediate option, but while "eu" is not valid POJO it failed with:

Code: Select all

javax.faces.FacesException: java.lang.NumberFormatException: For input string: "eu"
	at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:86) ~[javax.faces-2.2.14.jar:2.2.14]

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 56 guests