Thanks Steve. I'll investigate using that perhaps instead of storing it in the visit object. Incidentally, I haven't had any comments as to whether the visit pattern is no longer the best practice with version 4.1.1 upwards... I'd be grateful to hear people's views. I think the reason I'm not clear is because I don't know the reasoning behind the getVisit() method being deprecated - so I wrote my own that kind of does the same thing - getTheVisit().
Currently, my solution is to have my BasePage (which extends the Tapestry BasePage) implement PageBeginRender, it then checks the page being opened to see if it is one of my 2 for which I want state to be kept, and if it isn't, it clears the state out of my visit object - which is where i moved the state to since it is easier to get to there. If anyone has a tidier solution - because I think that this method has to be about the most inefficient (forcing a check of the page 2x per requestCycle for every page in the application), I would be very grateful to hear it. Thanks Gareth ----- Original Message ---- From: Steve Shucker <[EMAIL PROTECTED]> To: Tapestry users <users@tapestry.apache.org> Sent: Wednesday, 4 April, 2007 9:54:52 PM Subject: Re: Page Cleanup Tasks I'm not sure where you'd call it from, but IRequestCycle.forgetPage(String) will cause it to dump any state connected to a given page. -Steve Gareth wrote: > hi, > > I am storing a list of items in the session using @Persist("session") and > that is working well, however I would like to remove that list from the > session if that area of my application is left by the user. Is it possible > to establish via the PageDetachListener or some other method which page the > user has decided to jump to from my menu, and dependant on that page, clear / > keep my session variable? > > Many thanks > > Gareth > > > > > > > ___________________________________________________________ > New Yahoo! Mail is the ultimate force in competitive emailing. Find out more > at the Yahoo! Mail Championships. Plus: play games and win prizes. > http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ___________________________________________________________ Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]