1 Reply Latest reply on Apr 19, 2010 2:31 PM by nbelaevski

    What is AJAX.js for?

    blabno

      I've looked at sources of Richfaces-4.0.0.ALPHA1 especially at JavaScript, since shift to jQuery was announced some time ago. I see that there is window.RichFaces and window.A4J.

      Both contain methods for making ajax request, form submissions, push and others. Why is the code duplicated?

       

      window.RichFaces sometimes uses jsf.ajax and sometimes jQuery to perform ajax requests. Why is that?

       

      What does Sarissa have that jQuery does not and where is it used?

        • 1. Re: What is AJAX.js for?
          nbelaevski

          Hi Bernard,

           

          There is a number of legacy JS files in 4.0.A1, like prototype or sarissa. They aren't used and will be removed. jQuery is the base library for 4.x.

          window.RichFaces sometimes uses jsf.ajax and sometimes jQuery to perform ajax requests. Why is that?

          a4j:push component uses HEAD requests for server pinging and jsf.ajax doesn't allow sending such types of requests. So we've employed jQuery for sending them. And if HEAD request initiated by jQuery returns with data availability flag, we trigger common AJAX request via jsf.ajax.