[Seaside] Re: with: takes block vs string

itsme213 itsme213 at hotmail.com
Wed Jul 23 16:24:50 UTC 2008

"SainTiss" <saintiss at gmx.net> wrote in message 
news:200807231656.43664.saintiss at gmx.net...
> Perfect!
> AND it will rerender the page :)

For an Ajax version, you can also insert an
    (html updater...) printString
into your javascript. #updater will replace a target element in browser with 
the callback rendering from the server; #request will just make a server 

renderContentOn: html
 html script: 'function showCell(cellid) {',
  ((html updater
     id: 'theTargetElement';

     "1 primary callback on server, including re-rendering onto :r"
     callback: [:r | self renderResultOn: r];

     "0 or more secondary callbacks with client-side /value/
      e.g. to pass back other client-side values"
     callback: [:v | self recordClientValue: v]
       "value: turns into JS for client to pass back"
       value: (SUStream new nextPutAll: 'cellid')))
   printString, '}'.

- Sophie 

More information about the seaside mailing list