[Seaside] Re: Re: session variable vs. dynamic variable
h.kleinsorgen at i-views.de
Sat Feb 9 11:47:14 UTC 2008
> "Holger Kleinsorgen" <h.kleinsorgen at i-views.de> wrote
>> - implement #announceOrDelegate:
> Sounds promising, thanks.
>> This way, the component with the callback does not need to know any
>> details about the parent component. Also, it's easy to turn AJAX requests
>> off (by making #asyncRenderWith: simply evaluating the block, and
>> #asyncCallback: falling back to #callback:).
> What block args & typical body goes into
> asyncCallback: [ ?? ]
> Any rendering code at all? Or just model &/or component tree updates? Even
> "id" is not required by the callback rendering method? Sounds quite nice.
> Can you share a small example and/or the implementation?
attached is a fileout of the required code (I hope I didn't miss
anything, it was part of a larger package).
it was implemented using VisualWorks 7.6 & seaside 2.8, so I don't know
if it can be filed in into other images (the "squeak" fileout was
created using VW's fileout compatibility code, I have never filed it
into a Squeak image). It uses Mootools, but should be easy to adapt to
other frameworks, by writing a specific subclass of AsyncUpdater.
the fileout includes a simple example component showing how to use both
features (see ExampleTreeComponent>>renderContentOn:, renderToggleOn:,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6246 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20080209/59d9fad8/SeasideEnhancements-0001.zip
More information about the seaside