[Seaside] "html sortable" + "html updater"
Jeremy Shute
shutej at crazilocks.com
Wed Dec 13 22:34:14 UTC 2006
Now would be a good time to mention that:
SUSortable>>destory
...is a typo for...
SUSortable>>destroy
:-) Still acting on the rest of the advice. Thanks!
Jeremy
On 12/13/06, Lukas Renggli <renggli at gmail.com> wrote:
>
> > After I click on a link that updates the contents, the list is no longer
> > draggable it seems. Is there something I need to do for the sortable
> stuff
> > to understand that the DOM has changed?
>
> Yes, you need to remove the sortable before updating (actually it is
> not really necessary, but it keeps the browser fast and clean) and
> recreate the sortable afterwards. The sortable needs this to update
> all the assigned event handlers, the cached list of elements, etc.
>
> You can do it with something like this:
>
> (html sortable
> id: 'sortable';
> destroy) ,
> (html updater
> id: 'whatever';
> callback: [ :r | " do whatever modifies the sortable " ];
> onSuccess: (html sortable
> id: 'sortable') " recreate the sortable (a factory method
> would be better) "
>
> HTH,
> Lukas
>
> --
> Lukas Renggli
> http://www.lukas-renggli.ch
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061213/bb17340a/attachment.htm
More information about the Seaside
mailing list