I want to order my records by using drag n drop(form in table view)
At now I’m able to caught the record that I want move but I can’t identify how is the record in wich I perform the drop.
For example:
[attachment=1]dnd.JPG[/attachment]
In this image we can see that I’m dragging a record with mach_id = 1744 and I’m dropping it on the record with mach_id = 1741.
The problem is that I haven’t found a way to catch this paramether “value” that contains the id of the record in wich I perform the drop action:
[attachment=0]dndvalue.JPG[/attachment]
Unfortunately now it doesn’t work but this was the principle:
[attachment=0]img.PNG[/attachment]
Watch the image above, into the DROP event you can see that the function .getSource() is returning a string.
I’ve split the string with the “:” character and I’ve taken the last array element that I’ve obtained.
This was the id of the record in wich you perform the drop…this some time ago, now (maybe after some fix) .getSource() return always the id of dragged record instead the id of the record in wich I’ve dropped.
getSource() doesn’t return string… Thats just the tostring implementation of the TypeAhead field.
So it really returns the element with the name mach_id which is a TypeAhead field.