[Seaside] passing additional parameters to an anchor callback

Lukas Renggli renggli at gmail.com
Mon Oct 5 21:27:01 UTC 2009


> You mean like the code below? That would indeed avoid to put the values in a
> component instance variable.

Yes, but as I said, that only works with real closures.

> So there's no mechanism to pass those directly to the callback then? I
> assume that if the ajax call was not received (and answered) by the seaside
> application that the webbrowser will not execute the anchor link? (I should
> check that...)

You should not combine an AJAX and a traditional callback. They will
not be guaranteed to run in the right order. Instead do everything
with AJAX along these lines:

html anchor
    onClick: (html jQuery ajax
        trigger: [ :values | tempvalues := values ] passengers: ...;
        callback: [ ... does something with temps ... ];
        onSuccess: html javascript refresh);
    with: ...

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the seaside mailing list