[Seaside] What to write in the "onDrop:" ?
sebnozzi at googlemail.com
Thu Aug 13 13:20:59 UTC 2009
(Scriptaculous) part talk to the Smalltalk one. Using Seaside 2.8.
What I want to have are mouse-movable DIVs (which represend model
objects) that remember their position the next time they are rendered.
For that, I would like to know how to pass the coordinates (offset)
from a dropped DIV back to the Smalltalk side and store that property
in one model object. I've seen that SUElement provides something like
this, but I'm clueless as to what to write in the #onDrop: part of my
droppable to make the connection.
back as a ajax-request to the server/smalltalk side... I am correct?
The modified snippets would look like these:
"Render the drop-container"
html div script: (html droppable accept: 'myDraggableClass';
onDrop: "..." ); with:[ ...
"Render the DIVs to be dragged inside container"
myElements do:[:e | html div passenger: e;
Any hints? Are there examples on the use of SUElement and co.?
Thanks in advance!
More information about the seaside