I am using JSF Mojarra 2.2.1 , Primefaces 4.0 Snapshot and IE 9. This problem happens in IE 9 and also a similar problem exists when I replace it with f:ajax unless I render using @all. When command button is rendered via ajax request, it fires a normal request in the following request. I created a simple code to illustrate the problem.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<h:form id="testForm">
<h1>Test of IE9 Ajax</h1>
Text: <h:outputText value="#{testBean.count}" />
<br />
<p:commandButton oncomplete="alert('a')" update=":testForm"
action="#{testBean.increment}" value="click me">
</p:commandButton>
</h:form>
</h:body>
</html>
And my bean is,
package test;
import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class TestBean implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private int count = 0;
public void increment()
{
count++;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
}
In the test, alert is given on only at odd numbers which is an other indicator of ajax call is not made smoothly.
Update:
I realized this is happening because IE9 ignores inputs' onclick="javascript" events when they are replaced jquery's replace all method.
Update 2:
This does not happen in my home computer IE 9 (same version), it happens only in office computer. I cannot see security settings, Do you know why this happens? Javascript works but does not function properly.
Any help is highly appreciated.
Thanks