• 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: Creating a session with an initial DirectAction
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating a session with an initial DirectAction


  • Subject: Re: Creating a session with an initial DirectAction
  • From: David LeBer <email@hidden>
  • Date: Fri, 4 Sep 2009 14:44:09 -0400


On 2009-09-04, at 2:29 PM, David Holt wrote:

How do I do this? Should I do this? I want to provide different "doorways" to my app using DirectActions, but I need to set the NavigationRootChoice in session in order to set up state for the ERXNavigation stuff (each doorway presents a different navigation menu). Ideally I guess I would use ERXThreadStorage here, but I am not sure how to access it from the NavigationMenu.plist (currently I use session.navigationRootChoice).


I will leave the creating a session question for you to decide. (i.e. Session are not inherently bad, it depends on your needs (the number of visitors, etc) - some times they are the right solution).

Creating the session however is easy. Within your direct action method:

Session session = (Session)session();

This will return the session if it exists or create a new one if it doesn't.

You will need to decide how to handle the session id, either in the url or via cookies. Cookies will keep the url cleaner.

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site: 	http://codeferous.com
blog: 	http://davidleber.net
profile:	http://www.linkedin.com/in/davidleber
twitter:	http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Creating a session with an initial DirectAction
      • From: David Holt <email@hidden>
References: 
 >Creating a session with an initial DirectAction (From: David Holt <email@hidden>)

  • Prev by Date: Creating a session with an initial DirectAction
  • Next by Date: Re: Installing fresh WOLips+Eclipse on 10.6 failing
  • Previous by thread: Creating a session with an initial DirectAction
  • Next by thread: Re: Creating a session with an initial DirectAction
  • Index(es):
    • Date
    • Thread