<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Mariano,<div class=""><br class=""></div><div class="">My first question is why are you using the bootstrap select to render a list of items? If it’s not a select that you want but a sortable list, why not generate it immediately?<br class=""><div class=""><br class=""></div><div class="">The bootstrap plugin is generating the html based on the html you generated in Seaside.&nbsp;</div><div class="">In this client-side conversion step, the ids and scripts generated from Seaside are not (or cannot be) copied.</div><div class=""><br class=""></div><div class="">You need options in the plugin to pass callbacks. I took a quick look but I don’t see any.</div><div class="">If there are such options (there exist other such plugins), it still is a lot of fiddling on the client-side to hook up the right js callbacks to server-side callbacks, especially if you have more than one select to handle.</div><div class=""><br class=""></div><div class="">But there’s probably a good reason you are trying to do this. If that’s the case, I would try to use event delegation and put event handlers on the parent element of the select.</div><div class="">The plugin is probably generating the li right next to existing select but with the same parent. If that is the case, you can put jQuery event handlers on that parent element (which you generate from Seaside.</div><div class="">Something like:</div><div class=""><br class=""></div><div class="">html div</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>script: (html jQuery this) on: ‘click’ do: (html jQuery ajax callback:[ … ])</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp;with: [ self renderSelectOn: html ]</div><div class=""><br class=""></div><div class="">It probably will require some more complex handling with respect to getting the correct events sorted out…</div><div class="">I did not try these things, so I hope this helps</div><div class=""><br class=""></div><div class="">cheers,</div><div class="">Johan</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 16 Jan 2015, at 16:54, Mariano Martinez Peck &lt;<a href="mailto:marianopeck@gmail.com" class="">marianopeck@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi guys,<div class=""><br class=""></div><div class="">I have a html select list that then I convert to a UL / LI kind of list using Bootstrap select:&nbsp;<a href="https://github.com/silviomoreto/bootstrap-select" class="">https://github.com/silviomoreto/bootstrap-select</a></div><div class=""><br class=""></div><div class="">I want to make it sortable (which I could) but I cannot correctly hook onto the stop of the drop so that I can update my model/backend side.&nbsp;</div><div class=""><br class=""></div><div class="">I am trying to do something like:</div><div class=""><br class=""></div><div class=""><div class="">html script: &nbsp;((html jQuery id: '#myULList')</div><div class=""><span class="" style="white-space:pre">                        </span> sortable</div><div class=""><span class="" style="white-space:pre">                                </span>onStop: (html jQuery ajax</div><div class=""><span class="" style="white-space:pre">                </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;callback: [ :values | values asOrderedCollection inspect ]</div><div class=""><span class="" style="white-space:pre">                </span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;passengers: (html jQuery this find: 'li')))</div><div class=""><br class=""></div><div class="">Basically...I need to get 'values' with my real objects. The problem is that since I am not rendering the LI items myself (but bootstrap select does), I cannot specify the passenger..I mean...I cannot do something like "html listItem passenger: each" &nbsp;or whatever...</div><div class=""><br class=""></div><div class="">Any ideas how can I make it work?</div><div class=""><br class=""></div><div class="">Thanks in advance,&nbsp;</div><div class=""><br class=""></div>-- <br class=""><div class="gmail_signature">Mariano<br class=""><a href="http://marianopeck.wordpress.com/" target="_blank" class="vt-p">http://marianopeck.wordpress.com</a><br class=""></div>
</div></div>
_______________________________________________<br class="">seaside mailing list<br class=""><a href="mailto:seaside@lists.squeakfoundation.org" class="">seaside@lists.squeakfoundation.org</a><br class="">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside<br class=""></div></blockquote></div><br class=""></div></div></body></html>