[Seaside] Drag and drop between two select's?
Alejandro Martínez
alemartinez2112 at gmail.com
Thu Oct 11 06:16:12 UTC 2007
Hi all. this is my problem:
* I want to be able to drag and drop items boths sides of two <select>
lists, and if possible, both to be sorted.
* I've seen examples using simple xhtml lists (#unorderedList), but not
using xhtml <select> with <option>'s as items. AFAIK, the difference is
using a list you're in control of the rendering of an item (see
#renderInventoryOn: or #renderListItems: On: ) but using a select, how do I
specify the #passenger: for each <option>?
* Don't know if makes any difference, but right now I'm filling the select's
dinamically.
My guess:
#renderDivAOn: html
html div id: 'divA';
with: [ html select
size: 10;
list: self itemListA;
script: ( html sortable
constraint: false;
dropOnEmpty: true;
containment: #(divA divB);
onUpdate: ( html updater ?????) );
on: #itemListA
of: self ]
the same for #renderDivBOn: html, and if #itemListA was:
^ Collection methodDictionary keys
now it's gonna to be something like?:
#itemListAOn: html
^ Collection methodDictionary keys
collect: [: each | html option;
passenger: each;
with: [ each ] ]
Any idea?
(I'm using Scriptaculous-lr.216)
Cheers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20071011/af2ae86a/attachment.htm
More information about the seaside
mailing list