[Seaside] Accessing the Post body/content from an expired/cached
page before initialRequest
ramshreyas.rao at gmail.com
Tue Mar 13 05:59:44 UTC 2012
I am developing a (non-commercial) web application for mobiles on
Phar1.0/seaside30 (hosted on seaside-hosting for now, cheers to this
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
I tried something like:
| 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!
More information about the seaside