I really do not get you. What is the problem that you have?
Printable View
I really do not get you. What is the problem that you have?
Two trees.
We drag node from first one to second.
When we drop item to target tree we need to call request to change data model on the server (in database). And only after getting response we need to do some changes in target tree.
But when we dropped item to target tree, ExtJS whether adds new node to target or shows animated flight of item to source tree (if we said 'cancel drop'). The both cases is not convenient. Nothing has to happen with trees until we get response from server (e. g. after 10 seconds).
You can ask it not to do that.
http://www.extjs.com/deploy/dev/docs...beforenodedrop
Who can I ask not to do what?
Did you read the link? You complained about something, and I showed you how to fix it.
I told you about the same in all posts. In this handler I call request. But this method life cycle is finished before response comes from server. Dropping finished. And whether new node is created in target tree (if I don't cancel drop) or drop is canceled (if I do).
Yes. You cancel the drop and perform addition of the node in the Ajax success handler.
Can't you understand that it looks ridiculous?
User drops node.
Request created but dropping canceled.
User sees how node is flying to source tree.
User thinks that some error happened (his drop canceled).
After some time new node is created in target tree.
No one wants this behavior. It's just silly...
AND I SHOWED YOU HOW TO STOP IT.
STOP WHAT?!
I DO NOT WANT STOP DROP!
UNTIL I GET RESPONSE FROM SERVER!
I DO NOT WANT TO CANCEL DROP AND SEE HOW NODE RETURNS TO SOURCE TREE.
ALSO I DO NOT WANT TO SUBMIT DROP AND SEE ADDED NODE IN TARGET TREE.
Only when I get results from server some changes must take place!
PS Actually you didn't show anything. You just gave link to API that I've seen many times earlier.