[Seaside] updating the contents of a div as a side effect of a liveCallback..

Rick Flower rickf at ca-flower.com
Thu Feb 1 05:05:24 UTC 2007


Rick Flower wrote:
> Michel Bany wrote:
>>
>>> ... Seaside is complaining (likely because it's not allowed).. 
>> Can you be more specific ?
>> Are you able to create a small example that produce the Seaside 
>> complaint ?
>
> Michel -- It might be something I'm doing wrong, but I thought I saw 
> test code in the Async package that is more or less doing what I'm 
> doing.. I've got a submit button with the liveCallback (the new stuff 
> that you added the other day) that looks like the following :
>
> html div id: #blah with: [ html submitButton liveCallback: [:r | self 
> renderCartContents: self on: r]; text: 'Add to Cart'].
>
> Down in >>renderCartContents I've got the following :
>
> >>renderCartContents: dummy on: html
> html text: 'blah'
>
> When it comes time to do the liveCallback (by pressing the submit 
> button), I get the follow dialog box from Seaside :
>
> No replacement and no script evaluated, probable bug in your callback 
> code.
>
> See below the response produced by the callback code.
>
> <?xml version="1.0" encoding="utf-8"?><body>blah</body>
Ok.. I changed my test code in the liveCallback from that shown above to 
the following and my problems disappeared.. It must be my 
misunderstanding of ST I guess..

liveCallback: [:h | h span id: #cart_contents; with: [self 
renderCartContents: self on: h ]];

I guess it needs to write into a span...

-- Rick


More information about the Seaside mailing list