SUSortable - 2 lists - drag&drop lost after ajax re-render

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SUSortable - 2 lists - drag&drop lost after ajax re-render

Petr Fischer-3
Hi,

my next problem with SUSortable - I have two sortable lists. Both  
lists are completely re-rendered with ajax updaters on drop operation.  
Everything looks good, but "drag&drop" is inactive after ajax-rerender  
(I can't move list items by mouse anymore).

In Seaside Scriptaculous DEMO application on page "drag & drop" is  
example with two sortable lists - but there is a little difference -  
only the status paragraphs above lists are rerendered by ajax, not the  
lists itself.

I need to re-render whole lists on drop operations (due to some  
application logic conditions) and this is problem IMHO - maybe list  
items lost "mouse event connection" after afax re-render?
When is list-item connected to "mouse event" - on initial page load by  
javascript, right?

Sorry for English, is it understandable? Thanks, pf
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: SUSortable - 2 lists - drag&drop lost after ajax re-render

Lukas Renggli
>  I need to re-render whole lists on drop operations (due to some application
> logic conditions) and this is problem IMHO - maybe list items lost "mouse
> event connection" after afax re-render?
>  When is list-item connected to "mouse event" - on initial page load by
> javascript, right?

Yes, you need to unregister the old sortable (before updating) and
initialize a new sortable with the new DOM elements (after updating).
There are some hints on the script.aculo.us wiki, I think.

Cheers,
Lukas

>
>  Sorry for English, is it understandable? Thanks, pf
>  _______________________________________________
>  seaside mailing list
>  [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>


--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside