• 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 cookie in a DA handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding cookie in a DA handler


  • Subject: Re: Adding cookie in a DA handler
  • From: Lachlan Deck <email@hidden>
  • Date: Sun, 13 Jan 2008 21:41:30 +1100

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Adding cookie in a DA handler (From: Miguel Arroz <email@hidden>)
 >Re: Adding cookie in a DA handler (From: Miguel Arroz <email@hidden>)

  • Prev by Date: Re: JavaEOGenerator generates no files...
  • Next by Date: Inline bindings
  • Previous by thread: Re: Adding cookie in a DA handler
  • Next by thread: JavaEOGenerator generates no files...
  • Index(es):
    • Date
    • Thread