[Seaside] Generating an callback URL for third-party use

Johan Brichau johan at inceptive.be
Wed May 28 06:06:10 UTC 2014

Hi Esteban,

You can do it like this:

WACanvas>>magicalCallbackRegister: aBlock

	^ self context actionUrl withField: (context callbacks store: (JSAjaxCallback on: aBlock))

or inside any rendering method:

	url := html actionUrl withField: (html renderContext callbacks store: (JSAjaxCallback on: aBlock))

This is typically what Seaside bindings for jQuery plugins (et al.) will do to implement a Seaside callback that maps onto a javascript callback (or callback url).


On 28 May 2014, at 00:46, Esteban A. Maringolo <emaringolo at gmail.com> wrote:

> I want some way to create a url callback in the way of:
> callbackUrl :=  html magicalCallbackRegister: [ :json | self
> renderItemsOnJson: json ]. "answers a url"
> JSStream on: '$(''#element'').plugin({dataUrl:"', callbackUrl, '"})'.
> which once rendered as JS would be:
> $('#element').plugin({dataUrl:"/app/_s=...&_k=...&n"});
> I know this must be possible, because Seaside does it for all the
> callbacks, but I don't know how to create a simple callback and then
> get it's url to pass it around.

More information about the seaside mailing list