[Seaside] Comet and #call:

Julian Fitzell jfitzell at gmail.com
Mon Aug 2 21:23:47 UTC 2010

On Mon, Aug 2, 2010 at 3:01 PM, andres <andres at lifia.info.unlp.edu.ar> wrote:
> Hi Julian,
>> [snip]
>> It would be quite straightforward to have a callback that does a
>> #show: and then returns just the new component's HTML for the JS to
>> put in the DOM.
> Could you give me a hint on how to do this? I.E. start the #call: process by
> triggering the continuation step but avoiding the html response to reach the
> browser? If that is possible I think I can handle the rest.

Hi Andres,

I guess you want to do something similar to following (untested). I do
think you'll run into trouble later figuring out what to return in the
generic case and where to put the returned content in the browser, but
I'll be interested to hear how far you get.


renderContentOn: html
  html anchor
    callback: [ self showAndRespondWith: someComponent ];
    with: 'link'

showAndResponseWith: aComponent
  self show: aComponent.
  self requestContext respond: [ :response |
      contentType: WAMimeType textHtml;
      nextPutAll: (aComponent rendererClass builder render: aComponent) ]

More information about the seaside mailing list