Search code examples
primefacesjsf-2xhtmlactionlistener

actionListener in p:ajax


I am a little confused about the attribute actionListener in p:ajax, it does not appear in the taglib of primefaces 5.2.2 and Eclipse thinks so too because it marks it as not existing. primefaces-p:ajax attributesn

But the code works, the method in the bean is called with an ActionEvent parameter.

<p:ajax event="change" actionListener="#{bean.actionlistenerMethod}" update="stuff" />

So my question is, how can the actionListener work?

Primefaces: 5.2.2
JSF: 2.1.16
JBoss EAP 6.1


Solution

  • As you can see in the taglib and the doc the correct attribute to use would be "listener". Maybe they have covered "actionListener" in the backend just to ommit that kind of errors.