I am using primefaces with JSF2.3
here is the way my dependencies are
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:4.0.0'
compile group: 'javax.faces', name: 'javax.faces-api', version: '2.3'
compile group: 'org.glassfish', name: 'javax.faces', version: '2.3.3'
compile 'javax.servlet:jstl:1.2'
compile 'org.jboss.weld.servlet:weld-servlet:2.4.5.Final'
compile group: 'org.primefaces', name: 'primefaces', version: '6.2'
}
my jsf file is very basic
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://xmlns.jcp.org/jsf/core">
<h:head>
</h:head>
<f:view>
<h:outputLabel value="Hello, world"/>
<h:form>
<p:selectOneMenu value="#{testView.chosen}"
style="width:200px">
<f:selectItem itemLabel="Select listing template"/>
<f:selectItems value="#{testView.list}"/>
<p:ajax event="change" process="@this" update="@all"/>
</p:selectOneMenu>
</h:form>
</f:view>
</html>
and my viewScoped bean also
@Named
@ViewScoped
public class TestView implements Serializable {
String chosen;
List<String> list;
@PostConstruct
public void setup(){
list = new ArrayList<>();
list.add("alpha");
list.add("gamma");
list.add("bravo");
}
getter and setter are ommited for simplicity.
the thing is that I used to work with (jsf 2.2, primefaces 6.1) and everything is working fine.
after the upgrade (jsf 2.3, primefaces6.2), I have a problem whenever the event change (when i change selection is triggered)
the error is
Uncaught TypeError: Cannot read property 'error' of null
at Object.<anonymous> (core.js.xhtml?ln=primefaces&v=6.2:3)
at i (jquery.js.xhtml?ln=primefaces&v=6.2:2)
at Object.fireWith [as resolveWith] (jquery.js.xhtml?ln=primefaces&v=6.2:2)
at A (jquery.js.xhtml?ln=primefaces&v=6.2:4)
at XMLHttpRequest.<anonymous> (jquery.js.xhtml?ln=primefaces&v=6.2:4)
Is there any conflict javascript between jsf2.3 and primefaces ?
update="@all"
should rarely be used... Does it work if you do not use that? Assuming your example is an minimal reproducible example it should work if you remove that – Kukeltje