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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to