[ http://jira.jboss.com/jira/browse/RF-3738?page=comments#action_12417810 ]
Mike Hanafey commented on RF-3738:
----------------------------------
The problem was traced to a difference in the "accept" header supplied by
Firefox 3 vs. Firefox 2:
Firefox 2
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Firefox 3
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
com.sun.faces.renderkit.RenderKitImpl#createResponseWriter (JSF RI 1.2) figures
out the content type, and by default with the FF2 accept header the result is
"application/xhtml+xml", but with FF3 it is "text/html".
com.sun.faces.renderkit.html_basic.HtmlResponseWriter#closeStartIfNecessary
(again JSF RI 1.2) encloses script content in a CDATA section based on the
content type, and only if it is "application/xhtml+xml" is the CDATA escaping
used.
Fortunately, there is a fix. In web.xml add:
<context-param>
<param-name>com.sun.faces.preferXHTML</param-name>
<param-value>true</param-value>
</context-param>
> simpleTogglePanel ajax broken if filter is NONE -- body tag is missing
> ----------------------------------------------------------------------
>
> Key: RF-3738
> URL: http://jira.jboss.com/jira/browse/RF-3738
> Project: RichFaces
> Issue Type: Bug
> Affects Versions: 3.2.1
> Environment: JDK 1.6, Facelets 1.14, JSF-RI 1.2_08
> Reporter: Mike Hanafey
> Attachments: neko.txt, none.txt, tidy.txt
>
>
> When:
> <context-param>
> <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
> <param-value>NONE</param-value>
> </context-param>
> the following trivial page generates an AJAX response that does not have a
> body element that encloses the actual body content (using 3.2.1.GA):
> <?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"
> 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:a4j="http://richfaces.org/a4j"
> xmlns:rich="http://richfaces.org/rich">
> <body>
> <a4j:log hotkey="M"/>
> <h:form id="theForm">
> <rich:simpleTogglePanel id="tog" switchType="ajax" opened="true"
> label="Toggle Label"
> immediate="true" ajaxSingle="true">
> <h:panelGroup rendered="true">
> <a4j:commandButton id="addKeywordButton" value="Add" title="Add a
> new keyword" reRender="tog"/>
> </h:panelGroup>
> </rich:simpleTogglePanel>
> </h:form>
> </body>
> </html>
> With Firefox 2, the XML parsing still works, but with Firefox 3 there is an
> XML parsing error, so pages that actually are supposed to do something on the
> AJAX response appear to be dead. NOTE: In this trivial test case even Firefox
> 3 does not generate the parsing error, but in the real example this was
> derived from where the body content is more complex, then the parsing error
> happens. But even in the trivial test case, the <body> tag is missing.
> I know the filter issue has come up many times before. It seems like a very
> good idea if the RichFaces developers would always run with the NONE setting
> so that these problems would be caught early.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues