[Seaside] Re: Re: Re: Re: Re: Ajax callback question: howtoupdatecomponenttreebefore #children gets called?

itsme213 itsme213 at hotmail.com
Sat Feb 9 21:32:12 UTC 2008

"Lukas Renggli" <renggli at gmail.com> wrote

>> Maybe changing the callback method name would help to understand.,
>> maybe having a keyword (#callback:inComponent:)
> That doesn't work, because a callback could render to many components.

I may be way off here, but why does it have to be all in a single callback? 
Could we do this:
- Explicitly separate one ModelUpdate vs. many ViewUpdates
- Allow each ViewUpdate to be callback:inComponent:


    onClick: aModelUpdateString then: manyViewUpdatesStrings

    callback: aViewUpdateBlock inComponent: aComponent

html anchor
    "do this first (wait for success event?)"
    (html request callback: [self updateModel])

    "then do this array of updates in parallel"
     {(html updater
         "id: anId not required; must be compA id"
         callback: [self viewUpdateA] inComponent: compA).
      (html updater
         "id: anId not required; must be compB id"
         callback: [self viewUpdateB] inComponent: compB).
      (html updater
         "by convention, on current component"
         callback: [self viewUpdate]). };

  with: 'do it'.

It would be nice if something like this could this be done without requiring 
the user to deal with the underlying Ajax lifecycle events.

Even better abstracted, if this is a common pattern:
  onClick: aModelUpdateBlock then: someViewUpdateComponents+Blocks


More information about the seaside mailing list