I think there might be an ajax way as well... having the page trigger an identifier ajax request from time to time having a certain token on page load.
That way you can track if a double page was opened by having two ajax requests from the same page, different tokens. That even should be integratable cleanly in any jsf version because the rendering part is not affected by this, the controller which handles the scopes probably can be done via a simple servlet. Probably an interesting idea to add such a mechanism to saveState, which curently cannot deal with this issue. Some kind of ajaxScope which can deal with those double page issues by simply not omitting the data until the last axjaxed saveState on the backend bean has been closed. This however probably also would mean the entire saveStating mechanism of x:saveState might have to be rewritten. Werner Mike Kienenberger wrote: > My currently project works best as a pure client-side solution. For > that t:saveState is sufficient. > > My last project was a pure server-side struts project, and what worked > best for it was to create a "page-scoped" state manager. > > As I mentioned earlier, I had it configurable to allow either a > maximum number of pages, and/or a maximum timeout value for the pages > in the session scope. In practice I never really hit these limits > due to the low-volume nature of the application. > > I don't think it's practical to try to determine when a page-scoped > item goes out of scope using any other criteria, both due to multiple > opened windows or backtracking/refreshing. It's too hard to "know" > that an end-user won't request the page again. > > Unless, of course, you're just going to disallow all such operations. > (That can be handled as a specific case of the above strategy -- > either set the maximum number of pages in the example above to one or > set the timeout to immediate). > > This is the same strategy set used by WebObjects, which is where I > first encountered the idea. > > On 10/4/05, Werner Punz <[EMAIL PROTECTED]> wrote: > >>Mike Kienenberger wrote: >> >>>You'd need to address backtracking and page refreshing issues as well. >>> >> >>Well there is also the problem of having to deal with double opened windows... >>Which means you run the system into a state where the object >>has to be garbage collected while the other window still is within >>the scope, thus you force a garbage collection of the object >>way to early. >>(Btw. a problem which also should exist in x:saveState) >> >> >>I had a very similar mechanism in my last Struts based project, because >>Struts dialogs >>did not do it for me (I found out it did not garbage collect the scoped >>objects >>until the session ran out), using a servlet filter. >> >>I gracefully omitted the problem yet, because I could not entirely figure >>out how to deal with it. >> >>What is the general consensous on solving this issue. >> >>I really have to look into spring dialog, and seam sources they probably have >>had solved this issue. >> >> > >

