[Seaside] Accessing SURequest / SUAjax post parameters
Edward Stow
ed.stow at gmail.com
Tue Apr 15 02:20:18 UTC 2008
On Tue, Apr 15, 2008 at 9:25 AM, Edward Stow <ed.stow at gmail.com> wrote:
> On Tue, Apr 15, 2008 at 8:57 AM, Lukas Renggli <renggli at gmail.com> wrote:
>
> >
> > Try this:
> >
> >
> > > html anchor
> > > onClick: (html request
> > > callback: [ self updateModel: testParamValue ];
> > > callback: [ :value | testParamValue := value ] value: 'abc');
> > > with: 'SURequest example'
> >
>
> I think a little more explanation of my scenario is needed: I have a
> client side javascript application -- a google maps mashup with a
> number of overlays, that is manipulated entirely within the browser.
> The browser model can be serialized in json format with a function
> call eg:
>
> myModel.toJson() -- so what I want to end up with is a callback that
> returns the json data to my Seaside component.
>
> The basic questions is how to construct a the requests so to call some
> function eg toJson() in the browser and return the string generated by
> the function.
I have been hacking around (in the pejorative sense) with
WACallbackStream -- this works but is clearly not at all elegant.
MyComponent>>processCallbackStream: aCallbackStream
aCallbackStream request fields
at: 'testParam' ifPresent: [:testParam | self updateModel: testParam ].
super processCallbackStream: aCallbackStream
And in
WACallbackStream>>request
^request
--
Edward Stow
More information about the seaside
mailing list