• 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: Passing variable from DirectAction to Session constructor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing variable from DirectAction to Session constructor


  • Subject: Re: Passing variable from DirectAction to Session constructor
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 7 Apr 2009 10:33:44 -0700


On Apr 6, 2009, at 9:18 PM, Cheong Hee (Gmail-P) wrote:

Dear all

I would like to pass in a value e.g. organization name from DirectAction to Session constructor. It allows me to look at the organization name and decide if a new ObjectStoreCoordinator to be created and setDefaultEditingContext accordingly during session construction stage. This is taking Chuck's suggestion to create one OSC per organization name, rather than create new OSC per session. How is the value be passed into Session constructor from DirectAction? I have figured hard and must have overlooked something. Appreciate any pointers.

ERXThreadStorage from Wonder is one way to pass in the parameter.

You could also override public WOSession createSessionForRequest(WORequest aRequest) in Application and set the default EC after session creation.


Also, since session().setDefaultEditingContext is not allowed to set to another EC after it is being called, is there any way to force it through if so required.


Make sure that you call setDefaultEdtiingContext _before_ you ever all defaultEditingContext.


Chuck


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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: Passing variable from DirectAction to Session constructor
      • From: "Cheong Hee (Gmail-P)" <email@hidden>
References: 
 >Passing variable from DirectAction to Session constructor (From: "Cheong Hee (Gmail-P)" <email@hidden>)

  • Prev by Date: Re: [Ann] New WOLips Custom Project Templates Wiki Section
  • Next by Date: Re: git info [was: Re: maven.]
  • Previous by thread: Passing variable from DirectAction to Session constructor
  • Next by thread: Re: Passing variable from DirectAction to Session constructor
  • Index(es):
    • Date
    • Thread