[Seaside] "html sortable" + "html updater"
shutej at crazilocks.com
Wed Dec 13 22:34:14 UTC 2006
Now would be a good time to mention that:
...is a typo for...
:-) Still acting on the rest of the advice. Thanks!
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
> > 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) "
> Lukas Renggli
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Seaside