On 13/01/2008, at 4:34 AM, Miguel Arroz wrote:

Looks like calling generateResponse() before the addCookie stuff makes it work.

Indeed as the response is only created during generateResponse.

Now I have another problem, the cookie is beeing erased somewhere between that and the response is actually sent to the browser. Oh well...

That would suggest to me that you're not retaining that response but returning the component in your DA -- which would subsequently have it's content generated again.

So do this:

public WOActionResults someDirectAction()
{
        WOComponent page = pageWithName( ... );
        WOResponse response = page.generateResponse();
        if( doNotShowPopupAgainCookie != null ) {
NSLog.out.appendln( "******************* response: " + showSurveyComponent.context().response() );
                response.addCookie( doNotShowPopupAgainCookie );
        }
        return response;
}

with regards,
--

Lachlan Deck

_______________________________________________
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