Search code examples
eventsprimefacesjsf-2

Which event is fired when completeMethod is executed on inputTextArea in PrimeFaces?


I need to use InputTextarea PrimeFaces component, which allow use autocomplete mechanism between text. All works great, except for p:statusAjax, when I'm typing, my loading var animation blocks screen.

I resolve this for AutoComplete PrimeFaces component by adding next lines between p:autoComplete:

<p:ajax event="query" global="false"/>

But when I try put this line between p:inputTextArea JSF shows error:

javax.servlet.ServletException: /notificaciones/edit.xhtml @162,50 <p:ajax> Event:query is not supported. at javax.faces.webapp.FacesServlet.service(FacesServlet.java:606) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)...

I've read PrimeFaces User Guide but for inputTextArea component there is no Ajax Behavior Section.

So, how can I know which event is firing when autocomplete method executed on p:inputTextArea?


Solution

  • Most of the time, the documentation is up-to-date so most likely there is no ajax event. But to be sure, you can always check the javascript source and/or the java source of the component (the source is open and freely accessible).

    You can always try without an event name to see if ajax is supported at all since all (most?) components have a default event.

    I'm in a good mood and A quick check for you in the java source and the forms.js javascript source of 6.1 (which contains the js for this component and which is split in its own forms.inputtextarea.js in the 6.1.3 Elite and upcoming 6.2 release) does not show any ajax events being used, so I think you are out of luck on this and need to file an enhancement request in github