Re: takeValuesFromRequest() on session creation
Re: takeValuesFromRequest() on session creation
- Subject: Re: takeValuesFromRequest() on session creation
- From: Dov Rosenberg <email@hidden>
- Date: Thu, 22 Jan 2004 16:40:17 -0500
TakeValuesFromRequest is only called when there is a form to process. If
there is no form, that method is not called.
Dov Rosenberg
Conviveon Corporation
http://www.conviveon.com
On 1/22/04 3:57 PM, "Chuck Hill" <email@hidden> wrote:
> Coincidentally, I am writing the chapter on this right now :-)
> http://www.wocode.com/
>
> Don't use takeValues to do this. That is the wrong place for that logic.
> Use the awake() method in Session and get the request from context().request()
>
> Chuck
>
>
> At 12:06 PM 22/01/2004 -0800, Mac Developer wrote:
>> Hi Everybody,
>>
>> Happy new year and thanks for a great place to learn WO. I am new to
>> WO (learning it for about 9 month now), and I am running into a
>> problem. I've checked all the WO websites, documentation and books for
>> about 2 days now. So here I am seeking help from all you WO gurus.
>>
>> In my app, I am using mostly DirectAction, but I also want to use
>> sessions to store stuff for each user. What I am trying to accomplish
>> is to read a cookie from the user's browser when a session is created
>> (which is whenever a user hits any page of the site since each page
>> refers to a session variable.)
>>
>> I first tried to add a takeValuesFromRequest() in my Session.java file.
>> But it seems like the takeValuesFromRequest() doesn't get called when
>> the page is using directActionRequestHandler. Then I added the
>> takeValuesFromRequest() in Application.java which didn't get called
>> either. I also tried adding it to individual page and that didn't help
>> either. But if I add a form and click on the submit button, then the
>> takeValuesFromRequest() gets called.
>>
>> So am I doing something wrong that the takeValuesFromRequest() is not
>> getting called in each Request-Response loop? Specifically, how does
>> one go about reading cookie from the browser when the user first hit
>> the app? I know this can be done since every time I visit the Apple
>> store, it knows my name already without me filling out a form or
>> hitting any submit button.
>>
>> Any hint or pointer is greatly appreciated. Thank you.
>>
>> Nick Yang
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
>>
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
--
Dov Rosenberg
President, Conviveon Corporation
370 Centerpointe Circle, suite 1178
Altamonte Springs, FL 32701
http://www.conviveon.com
email@hidden
(407) 339-1177 X102
(407) 339-6704 (FAX)
(800) 475-9890
(407) 310-8316 (cell)
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.