[CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

  1. #1

    [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

    I'm using the TreePanel on one of my pages, similar to the following example: #/TreePanel/Basic/DragDrop_Between_Trees/

    I've got drag and drop of nodes setup for one TreePanel, but I want to know how I can get access to the "Target" node ID from the server-side.

    I've got a DirectEvent ("BeforeNodeDrop") which passes in the Source node ID which I can obtain by calling the TreePanel.getSelectedNodes()... method, but I also need to know the target node ID so I can save the change in the database. Are you able to provide any guidance please?

    I've tried using the "NotifyDrop" handler of the DropConfig, but this doesn't appear to pass in a reference to the Target node in my function.

    Thanks

    Dan
  2. #2

    RE: [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

    Actually, I think I've figured it out - I added the following listener to the TreePanel, and when this calls my function it passes in a reference both to the "source" and "target" nodes, which I can then pass in as ExtraParams to my DirectMethod.

    <Listeners>
        <BeforeNodeDrop Fn="documentsNotifyDropNode" />
    </Listeners>
  3. #3

    RE: [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

    Hi,

    I think you should look into the following example
    #/TreePanel/Advanced/Remote_Mode/


    Remote_Mode is specially designed to perform server-side changes with confirmation (all remote actions send request to the server with action information and wait a confirmation)
  4. #4

    RE: [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

    Thanks - just what I needed.

    Dan
  5. #5

    RE: [CLOSED] [1.0] Drag Drop on TreePanel - Get reference to Target node

    I don't see the example you are referring to.

    I'm in a similar situation. I'm creating a tree panel, and I need to drag / drop nodes, and choose create and delete from a context menu and update my database via ajax.

    Preferably the context menu could be populated via ajax, but I don't know if that's possible.

    Is there an example that shows these things ?
  6. #6
    hello i am too in a similar situation . but how can i access "Vlademir " example?? i'm trying to make on server-side updating database on node dragging from treepanel to another !! plz i need help!!
  7. #7
    any help people!!
  8. #8
  9. #9
    hello Vladimir! thanks for replying !! i think that this example is not what i'm searching for.
    i need when i drag and drop a node into tree , to update the database . i want to call a methode that update my database.
    If u know anything about that ,plz help me. thanks

Similar Threads

  1. TreePanel - Drag & Drop
    By jigpatel06 in forum 1.x Help
    Replies: 0
    Last Post: Oct 19, 2010, 10:31 AM
  2. TreePanel - Drag and drop node if condition
    By Kaido in forum 1.x Help
    Replies: 0
    Last Post: Jul 14, 2009, 7:25 AM
  3. [CLOSED] TreePanel Drag and Drop
    By davidhoyt in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 28, 2009, 5:24 AM
  4. TreePanel:Copying from one node to another node using drag and drop
    By eighty20 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jan 25, 2009, 7:48 AM

Posting Permissions