3 Replies Latest reply on Apr 27, 2009 5:52 AM by Jay Balunas

    ActiveX dependencies?

    Dimitri Alexeev Newbie


      I would like to contribute some code to handle situations where ActiveX is disabled in IE6. The problem of IE6 is, some AJAX functions depend on ActiveX. This solution would be particularly useful to enable AJAX in conservative and restrictive environments, where IE6 is still The _Browser_ and ActiveX is still The _Evil_.

      In a nutshell: it is possible to replace "Microsoft.XMLHTTP" ActiveX with an alternative IFRAME based solution. The "Microsoft.XMLDOM" ActiveX can be replaced by XML-Islands (s MSDN). However, I need additional informations about effective ActiveX dependencies in RF in order to adapt the fall-back logic.

      At first sight there is a lot of ActiveX dependent JS-Libraries in RF-svn:

      XmlHttpRequest Wrapper 1.2.2
      jQuery 1.2.6,
      Ext JS 2.0 Beta 1

      My question is: do you really use all above libraries for XMLHttpRequest-task or is there only one you decided for?

        • 1. Re: ActiveX dependencies?
          Alexander Smirnov Master

          RichFaces uses Sarissa JS-library for AJAX framework. The old precestor Ajax4jsf initially has had one more transport based on the dynamic JavaScript, but it was removed far ago because of seldom requirement.
          If you have any working code to contribute, please create a task on the project issue tracker (https://jira.jboss.org/jira/browse/RF ) and attach patch to that issue.

          • 2. Re: ActiveX dependencies?
            Dimitri Alexeev Newbie

            Thank you Alex,

            I have analysed the Sarissa Library and found two affected JS-functions.

            1) Sarissa.getDomDocument


            2) XMLHttpRequest

            You can now find a patch for the Sarissa.getDomDocument function on the project issue tracker ( https://jira.jboss.org/jira/browse/AJSF-149 )

            The XMLHttpRequest-ActiveX-control is a bit tricky to simulate. There are some properties and methods, we can not simulate with IFRAMEs:

            - setRequestHeader
            - getResponseHeader
            - status
            - statusText
            - method

            My idea is to transport all those Headers, statusText and Method-Name in a HTTP-Cookie. This would be a bit cleaner solution than "contamination" of request data or responce XHTML with additional meta-tags or the like.

            I'm thinking about a small Servlet Filter based "wrapper" with the ability to modify the original Request using additional data from cookie.

            The same should be possible to copy Responce-Headers back to the the cookie.

            Modifying BaseFilter or BaseXMLFilter could be another alternative. What do you think?

            • 3. Re: ActiveX dependencies?
              Jay Balunas Master

              The Ajax3JSF jira project is deprecated - I have moved your issue to https://jira.jboss.org/jira/browse/RF-6952.