1 2 3 4 Previous Next 52 Replies Latest reply on Sep 27, 2013 12:41 PM by pgmjsd Go to original post
      • 30. Re: IE9 richfaces 3.3.3.Final

        Hi Brett,


        we have the same problem here as you describe. Did you find a solution or a workaround for this?



        • 31. Re: IE9 richfaces 3.3.3.Final

          Hi yes we solved it as far as we know, see below:



          Patched the AJAX.js script in the richfaces-impl jar with:

          1) IE9 detection from


          2) Logging fix - Move LOG class to start of file and remove all object toStrings (ie9 cant handle it)

          3) Add checks for "oldnode == null"



          Patched the Myfaces-impl with:

          1) Modified the HtmlRendererUtils class to add checks for "text/css"


          I will upload modified files if I can find how to attach jar files on this site....

          • 32. Re: IE9 richfaces 3.3.3.Final

            You could solve all the problems of ajax with that?

            • 33. Re: IE9 richfaces 3.3.3.Final

              Does this solution fix rich:tree node selection for any of you? I'm using a patched AJAX.js and everything works except for treenode selection.

              • 34. Re: IE9 richfaces 3.3.3.Final

                I tried above mentioned solution to fix IE9 issues, however even in IE7 compatibility mode some bugs were present. After spending some time in IE development tools here's addition to richfaces-impl fix:

                1) Instead of patching Sarrissa framework ( "1) IE9 detection from..") it is better to upgrade Sarissa framework to it has some additional IE9 issues fixed, to upgade framework, download sarissa.js from http://sourceforge.net/projects/sarissa/files/ and replace first part of AJAX.js (till EOF comment) or replace sarissa.js in richfaces souce resources and use maven to build new jar.

                2) For richfaces-impl work in non-compatibility mode in IE9, A4J.AJAX.replacePage method should be fixed either in AJAX.js or JSFAJAX.js(if you are building sources), custom document.open method does not work in IE9 document mode. Simply replace if(isIE) {  --> if(isIE&&!Sarissa._SARISSA_IS_IE9) { (line 2125 in AJAX.js, line 1121 in JFSAJAX.js).


                That's fixed IE9-related issues for our application ( myfaces 1.2.11 + richfaces 3.3.2.SR1).

                • 35. Re: IE9 richfaces 3.3.3.Final


                  We could fix our IE9 Problems with a simple Filter we added in the web.xml



                          <display-name>IE9 Filter</display-name>













                  package ch.bedag.gba.capweb.util;


                  import java.io.IOException;


                  import javax.servlet.Filter;

                  import javax.servlet.FilterChain;

                  import javax.servlet.FilterConfig;

                  import javax.servlet.ServletException;

                  import javax.servlet.ServletRequest;

                  import javax.servlet.ServletResponse;

                  import javax.servlet.http.HttpServletRequest;

                  import javax.servlet.http.HttpServletRequestWrapper;

                  import javax.servlet.http.HttpServletResponse;


                  import org.apache.commons.logging.Log;

                  import org.apache.commons.logging.LogFactory;



                  * IE9 Filter. Helps proper rendering on Internet Explorer 9.


                  public class IE9Filter implements Filter {


                      private final static Log LOG = LogFactory.getLog(IE9Filter.class);



                      public void init(FilterConfig filterConfig) throws ServletException {

                          // noop




                      public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {

                          // Hier zwingen wir den IE9 in den Kombatibilitaetsmodus

                          ((HttpServletResponse) response).setHeader("X-UA-Compatible", "IE=EmulateIE8");


                          // Der IE9 sendet fuer css neu nur noch "text/css" als Accept header.

                          // Dies hat zur Folge, dass die Klasse HtmlRenderUtils folgende

                          // Exception wirft.

                          // "ContentTypeList does not contain a supported content type: text/css"

                          // Um dies zu verhindern kann man entweder das Myfaces Patchen oder eben

                          // den Request korrigierren.

                          // Wir haben uns für die zweite Lösung enschieden und verändern den

                          // Accept header. Neu wird es "text/css, */*" anstatt nur "text/css"

                          String accept = ((HttpServletRequest) request).getHeader("Accept");

                          if ("text/css".equals(accept)) {

                              chain.doFilter(new IE9HttpServletRequestWrapper((HttpServletRequest) request), response);

                          } else {

                              chain.doFilter(request, response);





                      public void destroy() {

                          // noop



                      // Request Wrapper. Catches the getHeader for Accept. When it is text/css we

                      // will return simply "text/css, */*"

                      private class IE9HttpServletRequestWrapper extends HttpServletRequestWrapper {


                          public IE9HttpServletRequestWrapper(HttpServletRequest request) {





                          public String getHeader(String name) {

                              String header = super.getHeader(name);

                              if ("text/css".equalsIgnoreCase(header)) {

                                  header = "text/css, */*";


                              return header;




                  • 36. Re: IE9 richfaces 3.3.3.Final

                    Tempororily i resolve the problem by replacing the below lines. It works fine. Two changes can help you to resolve the problem


                    Find the file AJAX.js in richfaces-impl.jar

                    Location :  /org/ajax4jsf/javascript/scripts/AJAX.js



                    1 :


                                         line number 1398


                              oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);

                    and replace it by


                               if (typeof window.XMLSerializer != "undefined")


                              oldnode.outerHTML = new XMLSerializer().serializeToString(newnode);


                         else if (typeof xmlNode.xml != "undefined")


                              oldnode.outerHTML = xmlNode.xml;



                    2 :


                                         line number 1627



                    and replace by adding try, catch




                              dst.setAttribute(attr, value);


                         catch (err)








                    make a copy of AJAX.js file and modified the above lines and include this file into your main page that will replace the old one.

                    • 37. Re: IE9 richfaces 3.3.3.Final



                      Just wanted to add that this can be done without replacing anything in the jar files;


                      jQuery(document).ready(function() {



                        try {

                          if (jQuery.browser.msie && jQuery.browser.version >= 9) {

                            window.XMLSerializer = function() {};

                            window.XMLSerializer.prototype.serializeToString = function(oNode) {

                              return oNode.xml;



                        } catch (exception) {}



                        try {

                            A4J.AJAX.XMLHttpRequest.prototype._copyAttribute = function(src, dst, attr) {

                                var value = src.getAttribute(attr);

                                if (value) {

                                  try {

                                  dst.setAttribute(attr, value);

                                  } catch (err) {}



                          } catch (exception) {}



                      • 38. Re: IE9 richfaces 3.3.3.Final

                        i have problem in windows 8  and IE 10


                        Webpage error details is


                        User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)

                        Timestamp: Tue, 4 Jun 2013 14:40:24 UTC



                        Message: No such interface supported


                        Line: 120

                        Char: 1

                        Code: 0


                        i am using richfaces-impl-3.3.2SR1.jar

                        please help me......

                             Thanks in advance

                        • 39. Re: IE9 richfaces 3.3.3.Final

                          The problem with the


                          LOG.debug("Hidden JSF state fields: " + idsSpan);


                          is that XML node "ajax-view-state" which keeps hidden inputs with view state, do not have .toString() method, so when js tries to concat string and idsSpan.toString() raises an error.


                          If tried to "add" a toString() method to that kind of nodes:


                          try {

                                              var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.6.0");

                                              var newRoot = xmlDoc.createElement("root");

                            // newRoot is an object of the same type as idsSpan

                                              newRoot.prototye.toString = function() {

                                                        return this.xml;


                                    } catch (e) {



                          But with no success.  Anybody any insight?

                          • 40. Re: IE9 richfaces 3.3.3.Final

                            I'm also seeking a solution or any ideas for my IE10. Seems like many of us have same problem.

                            • 41. Re: IE9 richfaces 3.3.3.Final

                              For this exact issue I got the code from




                              include statically from a local file in web server


                              and comment that line


                              Can't find a better solution

                              • 42. Re: IE9 richfaces 3.3.3.Final

                                We are not planning on releasing any more releases of RichFaces 3.  To keep your apps running on any Internet Explorer release >= 9, be sure to set the document compatibility in your application to IE-EmulateIE8 as in:


                                <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" >


                                For more details, see:


                                Defining document compatibility:



                                Specifying legacy document modes


                                • 43. Re: IE9 richfaces 3.3.3.Final

                                  The <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>  solution did not work for me.   I'm using RichFaces 3.3.1.GA still because the calendar widget doesn't work at all in 3.3.3.Final.


                                  Maybe I'll fork 3.3.3.Final and fix it if I'm feeling ambitious.     Where is the source for RichFaces 3.3.3.Final anyway?

                                  • 44. Re: IE9 richfaces 3.3.3.Final

                                    I was about to say that it's probably not such a good idea to use browser detection to make the decision, but I did some investigating in IE10 and found that IE10 does have XMLSerializer.serializeToString(), but it doesn't work with this particular bit of code.  In fact, in the AJAX.js script at line 614 there is this:


                                    if(!window.XMLSerializer && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml){


                                         * Utility class to serialize DOM Node objects to XML strings

                                         * @constructor


                                        XMLSerializer = function(){};


                                         * Serialize the given DOM Node to an XML string

                                         * @param oNode the DOM Node to serialize


                                        XMLSerializer.prototype.serializeToString = function(oNode) {

                                            return oNode.xml;





                                    Interesting....   So it actually already knows how to fake this stuff out.   It's just not doing it.