1 Reply Latest reply on Feb 28, 2012 6:28 AM by ridcully

    Strange oncomplete loop

    jens.kaiser

      Dear all,

       

      we are using Richfaces 3.3.3, Liferay 5.2.3 and the JBoss Portlet Bridge 2 on a JBoss 5.

       

      In our application we use an oncomplete attribute to open a new browser window. The problem is, the script in the oncomplete attribute is called again and again. But this happens only after a page refresh, if any AJAX Request is called before anything works fine.

       

      We have this problem since we port our application to the PB2, maybe the interaction between PB2 and Richfaces is not correct?

       

      Another thing to mention is, that with onbeforedomupdate everything works fine.

       

      I hope anyone has a clue, whtas going on there?

       

      Thanks in advance

      Jens

        • 1. Re: Strange oncomplete loop
          ridcully

          Maybe this information is worth to share, so here is the cause of our problem.

           

          The richfaces strategy for reloading scripts after an AJAX request doesn't work correctly in the above scenario. The URLs for the scripts looks different for page refreshs and AJAX refreshs.  This means for the first Ajax refresh after a page load, the allready loaded scripts are reloaded. This breaks the oncomplete script.

           

          We fixed this issue by implementing our own BridgeStragegy.

           

          Best regards