• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Correct "Logout" Action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Correct "Logout" Action


  • Subject: Re: Correct "Logout" Action
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 29 Jul 2003 11:04:34 -0700
  • Organization: Global Village Consulting, Inc.

If not using D2W you can set the redirect like this:

public WOComponent logout() {
    session().terminate();

    WORedirect mainPage = (WORedirect) pageWithName("WORedirect");
    mainPage.setUrl(
        context().directActionURLForActionNamed(
        "default", new NSDictionary(Boolean.FALSE, "wosid")));

    return mainPage;
}


Chuck


Giorgio Valoti wrote:
On Martedl, lug 29, 2003, at 12:44 Europe/Rome, Goodbye Bill wrote:

What is the correct (aka "preferred") method of providing a "Logout"
function to the end user? Does one simply call a "dispose" on the editing
context? Maybe the session's "terminate" method?


I usually do something like this in the Session class.

public WOComponent logout() {
//<http://developer.apple.com/documentation/WebObjects/Reference/API/ com/webobjects/appserver/WOSession.html#terminate()>
terminate();
//<http://developer.apple.com/documentation/WebObjects/Reference/API/ com/webobjects/appserver/WORedirect.html>
WOComponent redirectPage = WOApplication.application().pageWithName( "WORedirect", context() );
// <http://developer.apple.com/documentation/WebObjects/Reference/API/com/ webobjects/directtoweb/ D2W.html#homeHrefInContext(com.webobjects.appserver.WOContext)>
( (WORedirect)redirectPage ).setUrl( D2W.factory().homeHrefInContext( context() ) );
return redirectPage;
}


--
Giorgio Valoti
-------------
_______________________________________________
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.


--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net

Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
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.

References: 
 >Re: Correct "Logout" Action (From: Giorgio Valoti <email@hidden>)

  • Prev by Date: Re: EO: Should I create primary keys?
  • Next by Date: Re: Xcode and webobjects 5.2
  • Previous by thread: Re: Correct "Logout" Action
  • Next by thread: Re: Correct "Logout" Action
  • Index(es):
    • Date
    • Thread