[Seaside] Accessing the Post body/content from an, expired/cached page before initialRequest

Ramshreyas ramshreyas.rao at gmail.com
Tue Mar 13 15:08:14 UTC 2012


"Are you using Comache or KomLight? Do you really need the whole body
or would the fields (WARequest>>  #fields / #queryFields /
#postFields) work as well?"

I am using Comanche. I just need the fields - the data the user entered before hitting submit.

One solution I'm working on is making the cached page contain a 'plain' html form (page originally served statically by apache) with a GET method and capturing the incoming data with initialRequest.

I'd much rather solve it entirely through seaside, though...



On Tuesday 13 March 2012 05:30 PM, seaside-request at lists.squeakfoundation.org wrote:

> Send seaside mailing list submissions to
> 	seaside at lists.squeakfoundation.org
> On Tuesday 13 March 2012 05:30 PM, seaside-request at lists.squeakfoundation.org wrote:
>
>> Send seaside mailing list submissions to
>> 	seaside at lists.squeakfoundation.org
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>> 	http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> or, via email, send a message with subject or body 'help' to
>> 	seaside-request at lists.squeakfoundation.org
>>
>> You can reach the person managing the list at
>> 	seaside-owner at lists.squeakfoundation.org
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of seaside digest..."
>>
>>
>> Today's Topics:
>>
>>     1. Accessing the Post body/content from an expired/cached page
>>        before initialRequest (Ramshreyas)
>>     2. Re: Accessing the Post body/content from an expired/cached
>>        page before initialRequest (Philippe Marschall)
>>
>>
>> ----------------------------------------------------------------------
>>
>> Message: 1
>> Date: Tue, 13 Mar 2012 11:29:44 +0530
>> From: Ramshreyas<ramshreyas.rao at gmail.com>
>> Subject: [Seaside] Accessing the Post body/content from an
>> 	expired/cached page before initialRequest
>> To: seaside at lists.squeakfoundation.org
>> Message-ID:<4F5EE250.4080905 at gmail.com>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> Dear all,
>>
>> I am developing a (non-commercial) web application for mobiles on
>> Phar1.0/seaside30 (hosted on seaside-hosting for now, cheers to this
>> brilliant service).
>>
>> I would like the user to bookmark a transaction page on her phone, add
>> it to her home screen and use it like any other app. She will enter data
>> for submission before any callbacks/page-loads are performed.
>>
>> This means that she will almost always enter data into a form on an
>> expired page and submit.
>>
>> I find that the WARequest object available to me from
>> RootTask>>initialRequest has its Post body stripped and is converted to
>> a 'Get' request at that stage.
>>
>> Is this true? I am a newb, ( to web-development itself, seaside is my
>> first framework! Avoided programming in general until I found, and fell
>> in love with, smalltalk) so perhaps I simply don't understand how the
>> information is encoded into the WARequest object, or in the Post method
>> in general.
>>
>> I tried something like:
>>
>> RootTask>>initialRequest: aRequest
>>
>>       | expiredFormData |
>>
>>       expiredFormData := aRequest bodyDecoded (or aRequest postFields..,
>> aRequest rawBody etc )
>>
>> The body is nil, as confirmed upon putting a halt here and inspecting
>> the WARequest object. It also seems to have converted the original Post
>> method into a Get. This would make sense given the instructions for
>> 'recovering from an expired session' that use updateUrl (and hence Get)....
>>
>> When I (tentatively) examined the full stack, I found something that
>> seemed to indicate the HTTPRequest is 'converted' to a 'native' request
>> way before RootTask>>initialRequest is called - I'm out of my depth
>> here, and am wary of monkeypatching the innards without some guidance.
>>
>> How would one capture Post data from an expired page and decode it?
>> Where is the best place to intercept the incoming request?
>>
>> Thanks, and sorry if I am posting below the level of this forum!
>>
>> ram
>>
>>
>> ------------------------------
>>
>> Message: 2
>> Date: Tue, 13 Mar 2012 09:09:41 +0100
>> From: Philippe Marschall<philippe.marschall at gmail.com>
>> Subject: Re: [Seaside] Accessing the Post body/content from an
>> 	expired/cached	page before initialRequest
>> To: Seaside - general discussion<seaside at lists.squeakfoundation.org>
>> Message-ID:
>> 	<CA+LFMPgUMV0=d1_hbwdHkgWY9yAibX_0Nkg5OypE=cnNxWdTTA at mail.gmail.com>
>> Content-Type: text/plain; charset=UTF-8
>>
>> Am 13. März 2012 06:59 schrieb Ramshreyas<ramshreyas.rao at gmail.com>:
>>> Dear all,
>>>
>>> I am developing a (non-commercial) web application for mobiles on
>>> Phar1.0/seaside30 (hosted on seaside-hosting for now, cheers to this
>>> brilliant service).
>>>
>>> I would like the user to bookmark a transaction page on her phone, add it to
>>> her home screen and use it like any other app. She will enter data for
>>> submission before any callbacks/page-loads are performed.
>>>
>>> This means that she will almost always enter data into a form on an expired
>>> page and submit.
>>>
>>> I find that the WARequest object available to me from
>>> RootTask>>initialRequest has its Post body stripped and is converted to a
>>> 'Get' request at that stage.
>>>
>>> Is this true? I am a newb, ( to web-development itself, seaside is my first
>>> framework! Avoided programming in general until I found, and fell in love
>>> with, smalltalk) so perhaps I simply don't understand how the information is
>>> encoded into the WARequest object, or in the Post method in general.
>>>
>>> I tried something like:
>>>
>>> RootTask>>initialRequest: aRequest
>>>
>>> Â  Â | expiredFormData |
>>>
>>> Â  Â expiredFormData := aRequest bodyDecoded (or aRequest postFields..,
>>> aRequest rawBody etc )
>>>
>>> The body is nil, as confirmed upon putting a halt here and inspecting the
>>> WARequest object. It also seems to have converted the original Post method
>>> into a Get. This would make sense given the instructions for 'recovering
>>> from an expired session' that use updateUrl (and hence Get)....
>> Are you using Comache or KomLight? Do you really need the whole body
>> or would the fields (WARequest>>  #fields / #queryFields /
>> #postFields) work as well?
>>
>>> When I (tentatively) examined the full stack, I found something that seemed
>>> to indicate the HTTPRequest is 'converted' to a 'native' request way before
>>> RootTask>>initialRequest is called - I'm out of my depth here, and am wary
>>> of monkeypatching the innards without some guidance.
>>>
>>> How would one capture Post data from an expired page and decode it? Where is
>>> the best place to intercept the incoming request?
>>>
>>> Thanks, and sorry if I am posting below the level of this forum!
>> Don't worry.
>>
>> Cheers
>> Philippe
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>> End of seaside Digest, Vol 111, Issue 14
>> ****************************************
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> or, via email, send a message with subject or body 'help' to
> 	seaside-request at lists.squeakfoundation.org
>
> You can reach the person managing the list at
> 	seaside-owner at lists.squeakfoundation.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of seaside digest..."
>
>
> Today's Topics:
>
>     1. Accessing the Post body/content from an expired/cached page
>        before initialRequest (Ramshreyas)
>     2. Re: Accessing the Post body/content from an expired/cached
>        page before initialRequest (Philippe Marschall)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 13 Mar 2012 11:29:44 +0530
> From: Ramshreyas<ramshreyas.rao at gmail.com>
> Subject: [Seaside] Accessing the Post body/content from an
> 	expired/cached page before initialRequest
> To: seaside at lists.squeakfoundation.org
> Message-ID:<4F5EE250.4080905 at gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Dear all,
>
> I am developing a (non-commercial) web application for mobiles on
> Phar1.0/seaside30 (hosted on seaside-hosting for now, cheers to this
> brilliant service).
>
> I would like the user to bookmark a transaction page on her phone, add
> it to her home screen and use it like any other app. She will enter data
> for submission before any callbacks/page-loads are performed.
>
> This means that she will almost always enter data into a form on an
> expired page and submit.
>
> I find that the WARequest object available to me from
> RootTask>>initialRequest has its Post body stripped and is converted to
> a 'Get' request at that stage.
>
> Is this true? I am a newb, ( to web-development itself, seaside is my
> first framework! Avoided programming in general until I found, and fell
> in love with, smalltalk) so perhaps I simply don't understand how the
> information is encoded into the WARequest object, or in the Post method
> in general.
>
> I tried something like:
>
> RootTask>>initialRequest: aRequest
>
>       | expiredFormData |
>
>       expiredFormData := aRequest bodyDecoded (or aRequest postFields..,
> aRequest rawBody etc )
>
> The body is nil, as confirmed upon putting a halt here and inspecting
> the WARequest object. It also seems to have converted the original Post
> method into a Get. This would make sense given the instructions for
> 'recovering from an expired session' that use updateUrl (and hence Get)....
>
> When I (tentatively) examined the full stack, I found something that
> seemed to indicate the HTTPRequest is 'converted' to a 'native' request
> way before RootTask>>initialRequest is called - I'm out of my depth
> here, and am wary of monkeypatching the innards without some guidance.
>
> How would one capture Post data from an expired page and decode it?
> Where is the best place to intercept the incoming request?
>
> Thanks, and sorry if I am posting below the level of this forum!
>
> ram
>
>
> ------------------------------
>
> Message: 2
> Date: Tue, 13 Mar 2012 09:09:41 +0100
> From: Philippe Marschall<philippe.marschall at gmail.com>
> Subject: Re: [Seaside] Accessing the Post body/content from an
> 	expired/cached	page before initialRequest
> To: Seaside - general discussion<seaside at lists.squeakfoundation.org>
> Message-ID:
> 	<CA+LFMPgUMV0=d1_hbwdHkgWY9yAibX_0Nkg5OypE=cnNxWdTTA at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Am 13. März 2012 06:59 schrieb Ramshreyas<ramshreyas.rao at gmail.com>:
>> Dear all,
>>
>> I am developing a (non-commercial) web application for mobiles on
>> Phar1.0/seaside30 (hosted on seaside-hosting for now, cheers to this
>> brilliant service).
>>
>> I would like the user to bookmark a transaction page on her phone, add it to
>> her home screen and use it like any other app. She will enter data for
>> submission before any callbacks/page-loads are performed.
>>
>> This means that she will almost always enter data into a form on an expired
>> page and submit.
>>
>> I find that the WARequest object available to me from
>> RootTask>>initialRequest has its Post body stripped and is converted to a
>> 'Get' request at that stage.
>>
>> Is this true? I am a newb, ( to web-development itself, seaside is my first
>> framework! Avoided programming in general until I found, and fell in love
>> with, smalltalk) so perhaps I simply don't understand how the information is
>> encoded into the WARequest object, or in the Post method in general.
>>
>> I tried something like:
>>
>> RootTask>>initialRequest: aRequest
>>
>> Â  Â | expiredFormData |
>>
>> Â  Â expiredFormData := aRequest bodyDecoded (or aRequest postFields..,
>> aRequest rawBody etc )
>>
>> The body is nil, as confirmed upon putting a halt here and inspecting the
>> WARequest object. It also seems to have converted the original Post method
>> into a Get. This would make sense given the instructions for 'recovering
>> from an expired session' that use updateUrl (and hence Get)....
> Are you using Comache or KomLight? Do you really need the whole body
> or would the fields (WARequest>>  #fields / #queryFields /
> #postFields) work as well?
>
>> When I (tentatively) examined the full stack, I found something that seemed
>> to indicate the HTTPRequest is 'converted' to a 'native' request way before
>> RootTask>>initialRequest is called - I'm out of my depth here, and am wary
>> of monkeypatching the innards without some guidance.
>>
>> How would one capture Post data from an expired page and decode it? Where is
>> the best place to intercept the incoming request?
>>
>> Thanks, and sorry if I am posting below the level of this forum!
> Don't worry.
>
> Cheers
> Philippe
>
>
> ------------------------------
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
> End of seaside Digest, Vol 111, Issue 14
> ****************************************



More information about the seaside mailing list