After a Primefaces upgrade from 6.0 to 8.0 - and a WildFly upgrade to use JakartaEE - my ajax event listener isn't called anymore. However the onsuccess
and oncomplete
JS is executed.
My XHTML:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:cc="http://xmlns.jcp.org/jsf/composite"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:pe="http://primefaces.org/ui/extensions">
<h:body>
<ui:composition template="/WEB-INF/template.xhtml">
<ui:define name="container">
<p:graphicImage id="myImage" library="projectLib" name="logo.png"/>
<pe:imageAreaSelect id="areaSelect" for="myImage" handles="true">
<p:ajax event="selectEnd" listener="#{testBean.selectEndListener}" oncomplete="console.log('complete')" onsuccess="console.log('success')"/>
</pe:imageAreaSelect>
</ui:define>
</ui:composition>
</h:body>
</html>
My bean:
@Named
@ViewScoped
public class TestBean implements Serializable {
public void selectEndListener(final ImageAreaSelectEvent e) {
// do something
}
}
Nothing unusual to see in the server logs. In my browser console, I see the following warning:
[Deprecation] Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/
Can anyone tell me what is going wrong?
- Primefaces: 8.0
- Primefaces extensions: 8.0.4
- JSF: jboss-jsf-api_2.3_spec
- WildFly: 21.0.2.Final
javax
package tojakarta
package.