• 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: Adding cookies in a DA method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding cookies in a DA method


  • Subject: Re: Adding cookies in a DA method
  • From: Kieran Kelleher <email@hidden>
  • Date: Thu, 19 Oct 2006 11:42:07 -0400

Thanks Mark and Chuck. Working now. calling generateResponse() on the DirectAction results, adding the cookie and then returning the result of generate response was the key.

The interesting neat thing is that I did not realize that WOResponse implements WOActionResults and WOResponse.generateResponse just returns itself. Not a week goes by where I am still not impressed by the thoughtful design aspects of WebObjects.

Regards, Kieran

On Oct 19, 2006, at 12:07 AM, Mark Morris wrote:

Hi Kieran,

Whatever you're returning from the DA implements WOActionResults, so you can generateResponse and add the cookies to the resulting WOResponse object. If you're returning a WOComponent, you could still use the returnPage.context().response().addCookie(...) technique before you actually return it.

Regards,
Mark

On Oct 18, 2006, at 10:40 PM, Kieran Kelleher wrote:

Hi,

Adding cookies using context().response().addCookie( ... ) in a WOComponent is fine, but how do you add a cookie in a WODirectAction action?

Regards, Kieran


_______________________________________________ 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: Adding cookies in a DA method
      • From: Chuck Hill <email@hidden>
References: 
 >Adding cookies in a DA method (From: Kieran Kelleher <email@hidden>)
 >Re: Adding cookies in a DA method (From: Mark Morris <email@hidden>)

  • Prev by Date: Component to display raw row results as table
  • Next by Date: Re: Component to display raw row results as table
  • Previous by thread: Re: Adding cookies in a DA method
  • Next by thread: Re: Adding cookies in a DA method
  • Index(es):
    • Date
    • Thread