JSF 2 Ajax requests fail in IE 9

I recently tried to test a JSF application on IE9 and found that all Ajax requests fail with the exception MalformedXML complaining about an undefined object when trying to access the removeChild attribute. I observed problems with both MyFaces 2.0.5 and mojarra 2.1.1. Are there any known limitations or prerequisites for supporting IE 9?

To reproduce the problem, I nailed it to a simple test case consisting of a single ajax request:

<?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>

bean

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;
    }
}
+3
source share
2 answers

Similar to the question of Mojarra JAVASERVERFACES-1981 .

+5
source

This problem cannot be reproduced using Mojarra 2.1.1 on Tomcat 7.0.12.

enter image description here

- . , , #{testBean.idDiv}. ( - ?)

, <h:outputScript> , JSF. . , - , . JSF, .

+2

All Articles