Re: Adding cookies in a DA method
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