You could also check the HTTP referer. If it is different from the current path you can clear all pages from the Session.
On Thu, Oct 23, 2008 at 1:42 PM, Ricardo Lecheta <[EMAIL PROTECTED]> wrote: > Hi, > > Bob, in fact the Wizards demo also put the WizardPage in the session.. The > Step1.onNext() does " getWizardPage().setStateful(true);" > > I think I´m going to implement the Filter.. As Malcolm said I also need to > be careful to not > clean the reference to the current page too. > > The problem is how the Filter can know what´s the current Page... Currently > the Page.getClass().getName() is the session key... > since the clean up code will be in some Filter, would be easier if the page > path is used as the session key, may be ? > > thank you.. > > On Thu, Oct 23, 2008 at 3:58 AM, Bob Schellink <[EMAIL PROTECTED]> wrote: > >> Hi Ricardo, >> >> >> Some alternative options that comes to mind: >> >> Use a single stateful Page with a list of swappable Panels. The new Wizard >> demo uses this approach. >> The advantage here is that there are fewer Pages in memory (should be >> easier to manage) but each consume more memory >> and they are not bookmarkable. You might want to take some time upfront at >> creating a proper Wizard control where you >> specify workflows consisting of Panels. Once the final Panel is processed >> the Page can set to stateless again. >> >> >> If you have multiple machines, Terracotta might be interesting. This >> allows your application to have more virtual memory >> and by adding more machines you increase your overall memory size. >> >> kind regards >> >> bob >> >> >> >> Ricardo Lecheta wrote: >> >>> Hi Bob / Malcolm >>> >>> I´m working in some very big application, that uses a lot of Stateful >>> Pages... In fact, this feature are very useful in a lot of scenarios.. >>> >>> I´m thinking now about how to clean uo the user session, since I don´t >>> wanna that a lot of pages remains in the session forever. >>> >>> I can call setStafeful(false), but sometimes I don´t know if the user >>> will go until the end of the use case... >>> >>> So may be can exist some pages in the session... and it will be a lot of >>> them >>> >>> I was thinking to create a Filter to iterate through the session objects, >>> and if it find some Page that is not the current Page, the filter >>> will remove this page from the Session... >>> >>> What do you think about this? any other idea? >>> >>> thank you... >>> >>> -- >>> Ricardo Lecheta >>> >> >> > > > -- > Ricardo Lecheta >
