I have a page containing a number of AjaxLinks that when clicked fetch data
and update some panels. When a user leaves one of these pages and returns
via the back button the state of the page isn't always how they left it.
However, this behavior happens only when the page is returned to the second
time. Using the the request logger I've been able to partially explain this
with the page IDs:


   1. First visit to page X has a page ID of 3
   2. AjaxLink requests for this page also have a page ID of 3.
   3. User leaves page then returns to page X via the back button; this
   request also has ID of 3
   4. User clicks AjaxLinks again, but here a new X page is created with an
   ID of 5
   5. User leaves page and again returns with the back button. Here the
   page state is as they left it in #2, and the URL confirms the page ID of 3

 I understand using the back button will always take the user to ID 3 since
it is present in the URL.

My workaround so far is to add the Page component to the target of my
AjaxLink onClick()s. This increments the page ID whenever an AjaxLink is
clicked and is reflected in the URL, so the back button always returns to
the last state.

So I have two questions - Why is a new page X created in step 4 above, and
why does adding the Page component to the ajax request target make a new
page map entry?

Thanks,

Mark

Reply via email to