1

Can I modify SelectManyMenu component like autoComplete component in primefaces. In detail, instead of fetching all data to SelectManyMenu component at one time, I want to fetch the data according to the user's inputs (letters).I want to fetch data in lazy mode.

Below code is not working..."Key up" event is not catched.

<p:SelectManyMenu value="EmployeeList" var="list">
<f:selectItems itemLabel="list.surname" itemValue="list.id"/>
<p:ajax event="keyup" listener="#{bean.doSomething}"/>
</p:SelectManyMenu>

Thanks in advance.

imageSail
  • 21
  • 4

1 Answers1

-1

I think you should attach the <p:ajax> Tag to the <f:selectItems> directly.

<f:selectItems itemLabel="list.surname" itemValue="list.id">
   <p:ajax event="keyup" listener="#{bean.doSomething}"/>
</f:selectItems>

Give it a try and let me know if that was the problem.

LarsBauer
  • 1,539
  • 18
  • 23
  • Thanks LarsBauer, but problem continues. After I implement your code trick, jsf gaves this ERROR : "Unable to attach behavior to nonClientBehaviorHolder parent". – imageSail May 15 '14 at 08:38
  • This error means that you can not attach the ajax component on the selectItems Element. Unfortunately my idea was wrong. But the selectItems do get displayed correctly? – LarsBauer May 15 '14 at 08:55
  • Can you provide your stacktrace or the exact error message? – LarsBauer May 15 '14 at 20:41