4 Replies Latest reply on Feb 11, 2009 10:36 AM by ilya_shaikovsky

    Browser back button go too much back

    ptr83

      Hello

      I have a problem with the "back" button of the browser.

      I have 3 page : the start page, a list page and a detail page.

      In the beginning, I am at the start page. I use a h:commandlink to go to the list page.
      On that page, I build a dynamic Panel Menu wich I set as AJAX mode (when you click on the menu, the list is rebuild directly and just the list, not the rest of the page).

      panelMenu = new HtmlPanelMenu();
      panelMenu.setMode("ajax");
      ...
      
      HtmlPanelMenuItem menuItem_AccountInfo = new HtmlPanelMenuItem();
      menuItem_AccountInfo.setMode("ajax");
      ...


      In the list, I use an a4j:commandLink (I had to, h:commanlink did not work because I am using on that page I guess) to go to the detail page.

      And then when I click on the browser back button, I go back to the start page (instead of the list page).

      What I am doing wrong? Is there a way to fix this? thanks

        • 1. Re: Browser back button go too much back
          ptr83

          I forgot to tell that after the a4j:commandLink (on complete action) I call a javascript to go to the detail page.

          • 2. Re: Browser back button go too much back
            ilya_shaikovsky

            back button is out of scope of RichFaces ajax framework. check for some thirdparties which takes care of it within ajax requests.

            • 3. Re: Browser back button go too much back
              ptr83

              Ok

              But if I take the problem in another way : I used javascript because in IE7 the a4j:commandLink was not working. Nothing was happening when I was clicking on it.

              And in firefox I had no problem, the navigation rule was working and I was going to the detail page.

              So instead of using javascript is there another way to fix the IE7 problem? thanks

              • 4. Re: Browser back button go too much back
                ilya_shaikovsky

                ah.. navigation :) a4j:controls should not be used for navigation except navigation inside a4j:include or redirect based navigation rules. It never worked in IE. Actually there is an issue on that but it still not planned. And actually was just not designed from the beggining. Because controls designed for partial updates within the page seems not a good solution for navigation.