[Seaside] "html sortable" + "html updater"

Lukas Renggli renggli at gmail.com
Wed Dec 13 21:01:06 UTC 2006

> 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) "


Lukas Renggli

More information about the Seaside mailing list