3 Replies Latest reply on Feb 27, 2010 4:26 AM by Nick Belaevski

    Firefox' global refresh brokes Ajax

    Akaine Harga Novice

      Hi everyone.


      Since the moment I started working with RichFaces I have been seeing an issue I didn't take seriously at first.


      Here are the steps to reproduce the issue:


      1. Open a RichFaces app in a clean unmodified Firefox.

      2. Submit some data using a4j method.

      3. Refresh the entire page (F5 or whatever).

      4. Submit some data again using a4j methods (still should work).


      At this point the URL in the browser's nav bar changes from http://mydomain/myApp to wyciwyg://XX/http://mydomain/myApp (where XX are some numbers) and of course the application stops working considering the nature of change.


      I doubt I'd be the first one to confront this issue so please share your experience and I'd be really gratefull if someone could help me with it.


      Platform: JBoss 5.1.0 GA

      MVC: JSF 1.2.13

      RichFaces: 3.3.2 GA


      Thanks in advance =)

        • 1. Re: Firefox' global refresh brokes Ajax
          Nick Belaevski Master

          Hi Akaine,


          That's a known problem caused by AJAX navigation. The limitation of AJAX navigation is that it should be of redirect type.

          • 2. Re: Firefox' global refresh brokes Ajax
            Akaine Harga Novice

            Thats good to hear. Could you point me in right direction how should I set ajax navigation to redirect type?



            I set <redirect/> in every nav rule I have and now I can refresh the pages without getting into FIrefox' cache but there's another problem then: How could I avoid getting out of servlet context? I am using xhtml packages and all my templates are in dirs instead of web root. So if I forget about the ugly URL (which the client should't see) I still have functionality issues which I didnt have without redirect tag.


            Maybe I'm missing something or could you say what did I do wrong?

            • 3. Re: Firefox' global refresh brokes Ajax
              Nick Belaevski Master

              Redirect navigation initiates new independent request, so new request context is created.

              To solve the problem you can:


              1. Use ordinary h:commandLink/h:commnadButton for navigation and not use redirect

              2. Use features that Seam provides to save data between redirects

              3. Use some kind of URL rewrite