[Seaside] Seaside 2.9-A2 JQuery serialize forms

Lukas Renggli renggli at gmail.com
Fri Feb 6 19:43:35 UTC 2009

> addButton: 'Create' do: (html jQuery ajax serializeForm callback: [self
> halt]);
> addButton: 'Close' do: html jQuery new dialog close);
> with: [html render: self createTournamentComponent].
> I'm not sure what to pass in as the callback, in order to retrieve the
> serialized fields. The #callback does not accept any parameters. Just
> getting started with Seaside, and may be thinking about this in the wrong
> way.

#serialize:, #serializeForm, and #serializeThis all do not need a
special callback, they simply trigger the callbacks that you assigned
to your form and form fields. So just write (html jQuery ajax
serializeForm) what will look for all form elements in the enclosing
form and trigger their respective callbacks with the correct values.

Btw, this is exactly the same as with #triggerForm: and
#triggerFormElement: in Scriptaculous.


Lukas Renggli

More information about the seaside mailing list