• 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: Direct Action App Editing Context management?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Direct Action App Editing Context management?


  • Subject: Re: Direct Action App Editing Context management?
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 9 Feb 2005 12:42:23 -0800

You might find the sections in Practical WebObjects on this topic of use.

If you are using direct actions _without_ a session, there is only the appendToResponse phase. If the page generated contains component actions then a session is created and so you would handle locking normally. If the page contains only direct actions, the pattern is:

- create the EC,
- lock the EC
- create and configure the return page
- call generateResponse on the return page
- unlock the ec
- dispose the ec
- return the previously generated response _NOT_ the page!

Chuck


On Feb 9, 2005, at 7:58 AM, Kieran Kelleher wrote:

How do you handle managing (lock/unlock) timing of editing contexts in a direct action app that does not have a session?

Normally I use session awake and sleep to lock/unlock peer editing contexts. At the page component level, could an EC that is passed from page to page be locked at the beginning of takeValuesFromRequest and unlocked at the end of appendToResponse, albeit that appendToResponse might be a different page and assuming that a reference to the EC was passed to that next page. Sort of like having a MultiECLock Manager built into a Page WOComponent subclass that every page in the app subclasses?

Is it feasible at all, or do you just always switch into session mode when you start working with data editing and stick with direct actions for read only segments of apps using the shared editing context to fetch data for display?


--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development 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: Direct Action App Editing Context management?
      • From: Anjo Krank <email@hidden>
References: 
 >Direct Action App Editing Context management? (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: Session Question
  • Next by Date: Re: here's the error on launch...
  • Previous by thread: Direct Action App Editing Context management?
  • Next by thread: Re: Direct Action App Editing Context management?
  • Index(es):
    • Date
    • Thread