[richfaces-issues] [JBoss JIRA] Created: (RF-10939) a4j:ajax example breaks in IE9 based on DOCTYPE

Magnus Dürr (JIRA) jira-events at lists.jboss.org
Tue Apr 19 08:27:33 EDT 2011


a4j:ajax example breaks in IE9 based on DOCTYPE
-----------------------------------------------

                 Key: RF-10939
                 URL: https://issues.jboss.org/browse/RF-10939
             Project: RichFaces
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Magnus Dürr


The sample below is more or less a copy of the example on richfaces showcase site. It works fine in IE9.
 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en" lang="en"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">

<h:head><title>Test</title></h:head>

<h:body>
     <h:form>
        <h:outputLabel value="Name:" for="nameInput"/>
        <h:inputText id="nameInput" value="#{helloWorld.name}">
            <a4j:ajax event="keyup" render="output"/>
        </h:inputText>
        <h:outputText value="Hello #{helloWorld.name}!" id="output"/>
    </h:form>
</h:body>

</html>
 

The problem occurs when I add other components to the page. In this example I have added an ajax enabled a4j:outputPanel *before* the test form: 
 

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xml:lang="en" lang="en"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:a4j="http://richfaces.org/a4j">

<h:head><title>Test</title></h:head>
 

<h:body>
    <a4j:outputPanel ajaxRendered="true" id="dummy"/>

    <h:form>
        <h:outputLabel value="Name:" for="nameInput"/>
        <h:inputText id="nameInput" value="#{helloWorld.name}">
            <a4j:ajax event="keyup" render="output"/>
        </h:inputText>
        <h:outputText value="Hello #{helloWorld.name}!" id="output"/>
    </h:form>

</h:body>
 
</html>
 

Now the code stops working in IE9, still works fine in Firefox. After some trial and error I have found two ways to make the example work again:  

* Move the a4j output panel below the form (have not tested if the output panel still works)
* Remove the DOCTYPE tag, changing it to Strict doesn't work you have to remove it completely...  


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the richfaces-issues mailing list