5 Replies Latest reply on Oct 2, 2009 10:47 AM by maxmustang

    a4j:status question


      Hi,

      I am using in my application in several places the component a4j:status.
      The component works great but there is a problem when the back button of the browser is used.

      Is there a possibility to not load the a4j:status component when the back button of the browser is pressed?

        • 1. Re: a4j:status question
          ilya_shaikovsky

          RichFaces has no facilities to handle browser back button.

          • 2. Re: a4j:status question


            Hi Ilya,

            But I don't want to handle the back button of the browser.
            What I want is something else.

            In my web-application pages I have next and back buttons.
            When I press next button this status component is shown.
            On the next page I press the back button of the browser. The browser tries to get me to the last page. But it shows the status and nothing happens.
            I saw this behaviour also at the component modalPanel.
            On the first page a have a link which shows a modalPanel. On the modalPanel I have 2 buttons with "Yes" or "No". When I press "No" the modalPanel dissapears and the first page is shown. When I press "Yes" the second page is shown and, of course, the modalPanel dissapears.
            But when on the second page I press the back button from the browser, the browser tries to show the first page. But the modalPanel is already opened.

            How can I make the modalPanel not to be shown from the beginning?

            I hope I have explained my problem propertly.

            Than you

            • 3. Re: a4j:status question
              ilya_shaikovsky

              Maybe just implement your navigation via standard controls?

              • 4. Re: a4j:status question
                maxmustang

                Hello, i advice to avoid back-button because you can go to pages with data states not actual any more (inconsistent data). (Make navigation with controls inside pages (jsf controls.)
                To disable browser back i use following in every page (f.i. in facelet template)

                history.forward();

                • 5. Re: a4j:status question
                  maxmustang

                  sorry here the code:
                  script type=text/javascript"
                  history.forward();
                  script