Jen*_*ens 3 ajax jsf jsf-2 internet-explorer-9
我最近尝试在IE9上测试我的JSF应用程序并发现所有Ajax请求失败,并且在尝试访问removeChild属性时抱怨MalformedXML异常抱怨未定义的对象.我观察了MyFaces 2.0.5和mojarra 2.1.1的问题.是否有任何已知的限制或先决条件来支持IE 9?
为了重现这个问题,我把它钉在一个由一个ajax请求组成的简单测试用例中:
<?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">
<f:view contentType="text/html">
<h:head>
<h:outputScript name="jsf.js" library="javax.faces" target="head"/>
</h:head>
<h:body>
<h:form id="#{testBean.idForm}">
<h1>Test of IE9 Ajax</h1>
<h:panelGroup id="#{testBean.idDiv}" layout="block">
Text: <h:outputText value="#{testBean.text}"/>
<br/>
<h:commandLink
action="#{testBean.onAction}"
value="click me">
<f:ajax render="#{testBean.idDiv}"/>
</h:commandLink>
</h:panelGroup>
</h:form>
</h:body>
</f:view>
</html>
Run Code Online (Sandbox Code Playgroud)
豆是
package ietest;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
@ManagedBean
@SessionScoped
public class TestBean {
private int clickCount;
private String idForm="testForm";
private String idDiv="testDiv";
public String getText(){
String text = "you clicked " + clickCount +" times";
System.out.println("Return text " + text);
return text;
}
public String onAction(){
System.out.println("onAction invoked");
clickCount++;
return "iebug";
}
public String getIdDiv() {
return idDiv;
}
public String getIdForm() {
return idForm;
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4662 次 |
| 最近记录: |