0

Using PrimeFaces <p:selectOneMenu> component, if I have for example 3 values like this:

<p:selectOneMenu value="#{buttonBean.number}">
    <f:selectItem itemLabel="Astrid" itemValue="Astrid" />
    <f:selectItem itemLabel="Banana" itemValue="Banana" />
    <f:selectItem itemLabel="Cards" itemValue="Cards" />
</p:selectOneMenu>

If I start typing "B", it selects the item Banana, but if I type "Ba", it selects Astrid because the last character is "a". If I use the <h:selectOneMenu> it works as expected. This behavior happens only with the PrimeFaces component.

What should I do?

Luiggi Mendoza
  • 85,076
  • 16
  • 154
  • 332
Mateus Viccari
  • 7,389
  • 14
  • 65
  • 101

1 Answers1

0

I try your case in primfaces 3.4 and did not reproduce your problem.When I typed "Ba" it selects Banana not Astrid,the only difference is that my list is Dynamic not static one as in your example.

hanan Ahmed
  • 442
  • 3
  • 5