Re: An Apps Session from a Framework
Re: An Apps Session from a Framework
- Subject: Re: An Apps Session from a Framework
- From: Tom Blenko <email@hidden>
- Date: Fri, 30 Apr 2004 00:57:56 -0700
On Apr 29, 2004, at 9:23 PM, Jonathan Fleming wrote:
I have a logout component that I want to put into a framework but it
has references to session eg.
Session sess = (Session)session();
sess.setUser(null);
sess.setEntry(null);
sess.setUsername(null);
sess.terminate();
What is the best way to point this back to the calling app and
therefore the session that wants to logout and terminate?
I've always done this by implementing a Session.logout() method which
calls Session.terminate() and returns a WORedirect to whatever the Main
page is. Similar to what Anjo suggests. logout() is implemented in the
Session because it isn't a separate component but it is called from
multiple pages.
I haven't done this as a separate component in a framework. If you want
it in a framework, subclass from Session in the framework and
implement logout() there. Then subclass from that subclass in the
application (what Chuck said).
Tom
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.