[Seaside] Javascript calls through jQuery

Johan Brichau johan at inceptive.be
Sun Mar 2 22:11:09 UTC 2014

On 02 Mar 2014, at 22:00, Johan Brichau <johan at inceptive.be> wrote:

> However, with the new WAJsonCanvas in Seaside3.1, we would prefer to get a JSON canvas as the argument to the #json: callback. 
> In the code above, it's the response stream.
> I think it should be possible, and I will take a look for that.

In Seaside 3.1, the following seems to work but I need to verify a bit more. In the meantime, this might help you.

JQGetJson>>json: aBlock
	"Defines a json rendering callback."

	self dataType: 'application/json'.
	self respond: [ :response |
			contentType: (WAMimeType applicationJson 
				charset: self requestContext handler charSet);
			nextPutAll: (WAJsonCanvas builder
				render: aBlock)]


More information about the seaside mailing list