You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Engelhart <mo...@gmail.com> on 2005/06/07 18:17:47 UTC

persistent properties and cleaning up HttpSession

Hi -

It's my understanding that using persistent page properties involves
letting Tapestry shuffle objects back and forth from the users
HttpSession.   In our admin apps we have large object graphs that we
need to store between requests and are thinking that we'd like to
allow Tapestry to do the management of this (i.e. less code for us to
write) but we also want to remove the objects from the HttpSession
when the user  moves on to another page.

Are there any hooks in the framework to allow for this?  

One thought is to call a base class "clean up" method that removes all
the persistent properties from the HttpSession.  Ideally there would
be some sort of EventListener we could tap into or some Engine method
that is called when the user is going to a new Page object so that we
could trigger this clean up.   I just haven't been able to determine
which method would be best to override in this instance since it's not
just the end of the response, it's triggered when the IRequestCycle
activates a different IPage then the one the user is currently on.


Thanks for any advice

MIke

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: persistent properties and cleaning up HttpSession

Posted by Scott Morgan <mo...@gmail.com>.
http://wiki.apache.org/jakarta-tapestry/ClearingPersistentProperties

On 6/7/05, Michael Engelhart <mo...@gmail.com> wrote:
> Well I went ahead and tried moving the HttpSession attributes that are
> mapped to my persistent page properties and they still didn't go
> away?!
> 
> Can anyone confirm that they are actually stored in the HttpSession
> and nowhere else?
> 
> Thanks
> Mike
> On 6/7/05, Michael Engelhart <mo...@gmail.com> wrote:
> > Hi -
> >
> > It's my understanding that using persistent page properties involves
> > letting Tapestry shuffle objects back and forth from the users
> > HttpSession.   In our admin apps we have large object graphs that we
> > need to store between requests and are thinking that we'd like to
> > allow Tapestry to do the management of this (i.e. less code for us to
> > write) but we also want to remove the objects from the HttpSession
> > when the user  moves on to another page.
> >
> > Are there any hooks in the framework to allow for this?
> >
> > One thought is to call a base class "clean up" method that removes all
> > the persistent properties from the HttpSession.  Ideally there would
> > be some sort of EventListener we could tap into or some Engine method
> > that is called when the user is going to a new Page object so that we
> > could trigger this clean up.   I just haven't been able to determine
> > which method would be best to override in this instance since it's not
> > just the end of the response, it's triggered when the IRequestCycle
> > activates a different IPage then the one the user is currently on.
> >
> >
> > Thanks for any advice
> >
> > MIke
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: persistent properties and cleaning up HttpSession

Posted by Michael Engelhart <mo...@gmail.com>.
Well I went ahead and tried moving the HttpSession attributes that are
mapped to my persistent page properties and they still didn't go
away?!

Can anyone confirm that they are actually stored in the HttpSession
and nowhere else?

Thanks
Mike
On 6/7/05, Michael Engelhart <mo...@gmail.com> wrote:
> Hi -
> 
> It's my understanding that using persistent page properties involves
> letting Tapestry shuffle objects back and forth from the users
> HttpSession.   In our admin apps we have large object graphs that we
> need to store between requests and are thinking that we'd like to
> allow Tapestry to do the management of this (i.e. less code for us to
> write) but we also want to remove the objects from the HttpSession
> when the user  moves on to another page.
> 
> Are there any hooks in the framework to allow for this?
> 
> One thought is to call a base class "clean up" method that removes all
> the persistent properties from the HttpSession.  Ideally there would
> be some sort of EventListener we could tap into or some Engine method
> that is called when the user is going to a new Page object so that we
> could trigger this clean up.   I just haven't been able to determine
> which method would be best to override in this instance since it's not
> just the end of the response, it's triggered when the IRequestCycle
> activates a different IPage then the one the user is currently on.
> 
> 
> Thanks for any advice
> 
> MIke
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org