8 Replies Latest reply on Mar 10, 2006 3:30 AM by emsa

    Browser back-navigation doesn't work

    emsa

      After moving from client-side to server-side state the back-navigation doesn't work any longer.

      I get the typical JSF-behaviour:

      1. Rendering a list-page.
      2. Clicking on a item.
      3. Render the details-page.
      4. Using browser back.
      5 .Clicking on item
      6. list-page reloads --- with client-side state the item is shown as it should.

      Doesn't back work with Seam in server-side mode?

        • 1. Re: Browser back-navigation doesn't work
          gavin.king

          I don't understand. Exactly *what* is the problem?

          Perhaps you would rather use PAGE scope for the list?

          • 2. Re: Browser back-navigation doesn't work
            emsa

            The problem is that when I click on an item on the list page I expect that the item-detail view is rendered. But if I use the back-button and then click on the item the item-view is *not* displayed instead the list-page is reloaded.

            If using client-side state the item-view is shown (as expected) even if the back-button is used.

            The list-data is in COVERSATION (and no PAGE is no good for this list).

            • 3. Re: Browser back-navigation doesn't work
              emsa
              • 4. Re: Browser back-navigation doesn't work
                gavin.king

                 

                "emsa" wrote:
                The problem is that when I click on an item on the list page I expect that the item-detail view is rendered. But if I use the back-button and then click on the item the item-view is *not* displayed instead the list-page is reloaded.


                I think you have a bug in your code ;-)

                • 5. Re: Browser back-navigation doesn't work
                  gavin.king

                  OH! I understand. You are talking about *JSF* server-side state saving! Not Seam server-side conversations!

                  We have been talking past each other.

                  There are two very different things here. Notice that all the Seam examples use:

                  * client-side JSF state saving
                  * server-side Seam conversations

                  A login id, etc, lives in the Seam conversation, not in the JSF view state, so it will be saved on the server side.

                  Apparently the CVS version of MyFaces fixes the bug you are describing with JSF server-side state saving.

                  • 6. Re: Browser back-navigation doesn't work
                    emsa

                    Phew thanks - sorry for the confusion - appenrently didn't read up enough .. still got one more question to understand what can be done.

                    If the state is keept as above:

                    I got a list of data in a CONVERSATION Component - data is saved on the server but the state needed for rendering is on the client?

                    Let's say that the data of the CONVERSATION Component changes over time when the application is used..

                    I use the application for a while and jump back a couple of pages ...

                    So now over to the question:

                    The data shown on the page is not the same as the data in the Component now right?

                    If I now "reload" the page I guess that the new page will reflect the state of the values currently in the Component and not as it was when the page was first rendered?

                    To truly connect the Component (data) to a page I will need to use a PAGE Component?

                    Thanks for our answers and patience Gavin!

                    • 7. Re: Browser back-navigation doesn't work
                      gavin.king

                      Using the PAGE scope is one solution. A different kind of solution is to use nested conversations.

                      • 8. Re: Browser back-navigation doesn't work
                        emsa

                        Ok - but to start a new nested conversation for every page can't be good?