Tree Component Drag and Drop

Hi, I've been playing around with a trail version of flex and
was interested to know if anybody had tried to implement the drag
and drop functionality of the Tree component to a TileList? After
much messing about I noticed the format of the Tree data in the
DragSource was different to that of other lists. I've tried
overriding the addDragData method to see if I can change the format
of the data although this seems to cause problems when the Drag
complete event is triggered. Any ideas or help would be
appreciated.

Hey, Thanks for the reply. Yes this appears to work although
it took a bit of messing around and I still had to override the
dragCompleteHandler method of the Tree component to get the tree
view to update. One issue I do have (This appears to be an issue
with the tree component) is as you drag and drop files across from
one tree to another, when you remove the last child node the parent
node which has a folder icon changes to a document icon. Is there a
way around this?

Similar Messages

  • How to get UIComponent of the selected node in af:tree with drag and drop

    Hi
    Are there examples showing how one could get a UIComponent using DropEvent to be used with a Popup showing as a custom "context menu" at the target node ?
    Right now, with dropEvent.getDropComponent, we could only get the tree.
    We like to get its selected node so that the popup shows at the node level, not at the tree level.
    Thanks

    Hi Frank
    Thanks for responding.
    We like to show on our custom "context menu" using PopupHints (not using facet name contextmenu) with 3 commandMenuItems.
    Since component id is needed by PopupHints to place this custom "context menu", we tried
    RichTree dropTree = (RichTree)dropEvent.getDropComponent();
    alignId = dropTree.getClientId(context);
    // alignId = pt1:pt_region1:1:pt1:pc1:navTree
    getClientId returns us the tree id and hence the context menu is placed next to tree.
    We like to place the context menu next to a target node of the tree when dragging and dropping.
    But we couldn't figure out how to get that node id.
    In your suggestion,
    List dropRowKey = (List) dropEvent.getDropSite();
    RichTree dropComponent = (RichTree) dropEvent.getDropComponent();
    dropCompoent.setRowKey(dropRowKey);
    how do we then get the id of this node then ? What's the method ?
    Thanks Frank

  • Is it possible to create a tree with drag-and-drop functionality using ajax

    I saw these samples;
    Scott Spendolini's AJAX Select List Demo
    http://htmldb.oracle.com/pls/otn/f?p=33867:1:10730556242433798443
    Building an Ajax Memory Tree by Scott Spendolini
    http://www.oracle.com/technology/pub/articles/spendolini-tree.html
    Carl Backstrom ApEx-AJAX & DHTML examples;
    http://htmldb.oracle.com/pls/otn/f?p=11933:5:8901671725714285254
    Do you think is it possible to create a tree with drag-and-drop functionality using ajax and apex like this sample; http://www.scbr.com/docs/products/dhtmlxTree/
    Thank you,
    Kind regards.
    Tonguç

    Hello,
    Sure you can build it, I just don't think anyone has, you could also use their solution as well in an APEX page it's just a matter of integration.
    Carl

  • Re-create Tree control drag and drop move

    Hello,
    Ive got a tree control where dragEnabled=true and I have
    custom handlers for dragEnter, dragOver, and dragDrop so that I can
    drag/drop from datagrid's to the tree and it works fine.
    The issue is now the built in tree functionality for moving
    nodes around within the tree is gone. When I set dropEnabled=true
    it breaks the ability to drop from the datagrid to the tree.
    How can i keep the ability to move tree nodes within the tree
    and also be able to drag and drop from a datagrid onto the tree?
    Thanks for any help!

    While doing more testing I found the solution.. seriously...
    dont know how I should have known this one...
    on Tree dragOver handler:
    if( from.id == 'data_grid' ) event.preventDefault();

  • SAPGUI scripting recording cause alv component drag and drop not work

    Hi all:
       after I started recording, and the drap and drop behavior of ALV tree component not work at once,
      any body has any idea or workround?
    Thanks
    Michael

    This problem has been asked in a couple of threads without any response.
    Similar to other folks, I have a page with a list orders. The list of the orders is displayed using the new basic Table component. User goes to a certain page. Then the user clicks the detail button column to lookup details of the order. When the user closes the details page he/she obviously needs to return to the same.
    Each time the user clicks the details button I get the current first row number, let's call it currentFirst, by using tableRowGroup1.getFirst() and save it in the session bean.
    When I return to the list of the order page, I am trying to use the suggested method tableRowGroup1.setFirst(currentFirst). I am using this method in the prerender() method. The problem is that when Creator displays the page the first time, the tableRowGroup1 does not seem to be bound to the respective provider yet. All attributes of the tableRowGroup1are equal either to zero or null. Therefore, as the debugger shows, tableRowGroup1.setFirst(currentFirst) does affect anything. Binding happens after the prerender method and I don't see anyway to intervene. Creator always displays the first page of the table on return from previous web page.
    I was also trying to set provider's cursor. I've checked in the debugger that I've set the cursor to the required row, but Creator still displays the first page of the table on return from previous web page.
    Any help would be greatly appreciated!
    Thanks
    Slava

  • Drag and Drop on Page Component

    Hi,
    I have an edit configuration which looks like this:
        <?xml version="1.0" encoding="UTF-8"?>
        <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
            jcr:primaryType="cq:EditConfig">
            <cq:dropTargets jcr:primaryType="nt:unstructured">
                <title-data-reference
                    jcr:primaryType="cq:DropTargetConfig"
                    accept="[.*]"
                    groups="[title]"
                    propertyName="./title" />
            </cq:dropTargets>
            <cq:listeners
                jcr:primaryType="cq:EditListenersConfig"
                afteredit="REFRESH_PAGE" />   
        </jcr:root>
    The drop taget in the JSP is defined like this:
        <div class="<%=DropTarget.CSS_CLASS_PREFIX%>title-data-reference">
            <b>Drop it here</b>
        </div>
    When I use this in a "normal" component drag and drop from the content finder works fine. When I *** the same edit configuration and the same drop target code to my page component, which has sling:resourceSuperType="foundation/components/page" specified, the drop area is not recognisable as a drop area.
    Both component and the page component dialog have a pathfield widget defined:
        <?xml version="1.0" encoding="UTF-8"?>
        <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
            jcr:primaryType="cq:Widget"
            fieldLabel="Titel"
            name="./title"
            rootTitle="Titel"
            xtype="pathfield"
            rootPath="/etc/xxx/titles">
        </jcr:root>
    Is a page component different from a "normal" component so that it does not accept a drop? Am I missing something else?
    Thanks in advance,
    Ronald

    Hi Jörg,
    good to hear from you.
    This would not really do what I want. I want to be able to associate a title (in my case a book title) with a page by dropping it on it. Then I have multiple parsyses (e.g. center, east) on my page and can drop components onto these which will display content from the title associated with the page.
    Currently I can only drag titles onto each individual component. If I followed your advise I would still have to drag the title onto multiple parsyses. Therefore it would really be helpful if CQ allowed you to drop stuff onto a page.
    In my opinion this would also be helpful for the geometrix outdoors example where one drops products onto a product-component. As soon as you want add another component to the page displaying different data from or based the same product you would need to drag the same product onto that new component.
    Best,
    Ronald

  • Error in drag and drop with a Tree component

    Hello, everybody.
    I'm doing a drag and drop with two trees.
    But, when I drag from a tree to another show this error:
    "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."
    Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".
    Anyone can help me?
    Thanks!

    Hi,
    +Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".+
    Don't worry, its a designtime warning because the EL cannot be resolved. MakeCurrent is a method on the FacesCtrl binding equivalent to ADF, which is applied at runtime and not available at design time
    +But, when I drag from a tree to another show this error: "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."+
    In drag and drop, ADF Faces performs the drag. However, the rest of the drop handling is up to the developer. Without any more information of what yur drop handler is doing, this question cannot be answered
    Frank

  • How can I drag and drop an item from one Tree control to another in LabVIEW 7.1?

    You can use the mouse up and down event on the two tree controls but the problem is making the correct selection in the second tree control. I want to be able to switch over to the selection bar of the second tree control so that I can place my item in the correct position. I know all possible workarounds with double-clicks and so on... but I really want a windows drag and drop.
    This is what I have for the moment. Please check the library below. I need to activate the selection bar of the second tree control somehow to get the position in the control. The VI below is written in LV 7.1
    Attachments:
    Drag&Drop.llb ‏65 KB

    Hi Jones,
    As far as I know this feature is currently not supported by the Tree control. A workaround, would be to use the vertical position of the mouse in the button up event to determine what line you�re dropping the item.
    If you would like the Tree control to include the drag and drop feature, please submit this as a Product Suggestion under the feedback at www.ni.com/contact.
    Good luck!
    Best regards,
    Philip C.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    - Philip Courtois, Thinkbot Solutions

  • Firefox crashes after dragging and dropping any component.

    When the TorButton add-on is enabled, Firefox will crash when an attempt is made to drag and drop any component. This includes tabs, text, images, and any other item drag-and-drop-able under normal circumstances.
    This is a known bug and info lives at https://bugzilla.mozilla.org/show_bug.cgi?id=715885 but I don't know if any fix has been found.
    I am running version 3.6 of Firefox, which I recognize is rather out of date. This is because I have yet to update from OS X 10.4.
    Thank you for any input you have.

    It looks like the patch for this crash hasn't been checked in, and unfortunately, since firefox 3.6.28 is the last planned update for 3.6, it doesn't look like it will ever be fixed on that branch :(

  • Help needed in drag and drop of Flex tree

    Hi,
    We have an application which allows drag and drop between
    multiple
    trees and lists.
    Here are the steps I follow to refresh on drag and drop:
    1. Dispatch a custom event which calls server.
    2. On successful response from server I change the model
    which is
    data provider for the tree.
    3. Then, set a flag which triggers 'invalidateDisplayList'
    and 'invalidateList' for tree (and other listeners).
    4. The tree refreshes fine. But as soon as I drag and drop
    between
    trees again, I get this error in Tree.as:
    TypeError: Error #1010: A term is undefined and has no
    properties.
    at mx.controls::Tree/::updateDropData()
    at mx.controls::Tree/calculateDropIndex()
    at mx.controls.listClasses::ListBase/showDropFeedback()
    at mx.controls::Tree/showDropFeedback()
    The behaviour is weird, sometimes the browser hangs and stops
    responding.
    I am calling 'contentTree.showDropFeedback(event)' in my
    dragOver
    event listener which is triggering error.
    My tree data provider is a custom class which has 'children'
    array
    collection attribute.
    Any help on how to resolve this issue would be highly
    appreciated.
    Thanks in advance,
    Sujatha

    the major restrictions in its implemented only in
    jdk1.1.Why!

  • Drag and Drop inside a component

    I am using the Project Gantt component and want to drag and drop inside the component. I want to drag a timeline from one row and drop it to another row. And also drag a timeline from a row and drop it another place in the same row. Can I make the component a dragsource and droptarget?

    Hi,
    should be posted at JDeveloper and OC4J 11g Technology Preview
    Frank

  • Custom Drag and Drop Component: When i add a skin, drag and drop no longer works?

    I have a skinnableContainer that acts as a container for other drag and droppable items. This container's drop functionality is added from it's parent at the same moment the container is added.
    This all works fine until i add a skin class to the skinnableContainer, now none of the draggable items can drop into the container as it did before.
    I assume that the Group component wrapping the content from within the skin is acting as a block somehow, but i'm not sure how to allow the drop functionality through it?
    Any ideas? Thanks in advance.

    Hello,
    Thanks for your replies... I tried modifying the if clause,
    but it did not work. I can use a trace statement to find out what
    the target is and what level it is at, but I cannot do this when it
    is in our presenter window.
    The code that is causing the problem can be accessed right in
    Flash. Just create a new quiz, then in the library, go to Quiz
    Files --> Learning Interactions --> Assets --> Controls
    --> Components, right click on drag and drop and select edit and
    then go to the actions frame. I am sure you already know this, but
    I just want to be clear I did not make this from scratch.
    This code works great when the quiz is the root movie. But if
    the quiz is encapsulated within another movie, it does not work. I
    can drag the objects, but they just snap back to where their
    starting points are. In the code I attached earlier...
    "this._parent.Target1" used to be "target".
    Just so you can see it all, I have attached the problematic
    function.
    What happens is that if "this._parent.Target1" is set to
    "target", the movie will function fine in Flash, but will not work
    in our presentation window. I can drag the draggable objects, but
    they always snap back to the location of where they came from.
    What this means is that the if clauses are not being run, and
    the function is always running the else clause, which puts all of
    the objects back at their starting point.
    In the code attached, I am using "this._parent.Target1".
    Again, works fine in Flash, but when I put it in the presentation
    window, this time, I can drag the objects anywhere on the screen,
    but when I drop them, they think that the dropZone is the question
    itself, and not the Target (Target1). So I need to figure out how
    to make Target1 be the dropZone in our presentation window.
    Any ideas?
    Thanks again for all your help!

  • Drag and drop in tree and grid

    Hi all, I have one question on dragging and dropping from grid to/from tree.
    In a screen I have one tree and one grid. The following operations need to be performed on this screen.
    1. Drag from grid and drop in tree.
    2. Drag from tree and drop in grid.
    3. Drag from tree and drop in tree itself.
    Actually we will add the flavors for every action. Here I am confused in how many flavors I need to take.
    What I am taking right now are:
    For tree: 3 seperate flavors.
    For Grid: 2 seperate flavors.
    Can you please advise me on this.
    Thanks and Regards,
    Balakrishna.N

    Hello,
    Try with this programs
    BCALV_TEST_GRID_DRAG_DROP
    BCALV_TEST_DRAG_DROP_02

  • Drag and drop in ALV tree

    Hi All,
    I have a small requirement, I have to implement drag and drop functionality in ALV ( simple trees ) in such a way that the entire contents ( Folders and its sub folders ) have to be copied. As of now i am able to drag and drop
    one at a time, ie drag and drop  folder and then  again drag and drop its sub folder. Any solution to drag and drop both folder and its sub-folders in one step.
    example program -> rsdemo_drag_drop_tree_multi which allows drag and drop  of folders one at a time.
    Thanks and Regards,
    Kiran.

    Hi ,
    just type BCALV_DND_* in se38 editor and press f4 you will get log of examples for drag n drop funtionality.
    regards
    Ashutosh
    reward points if helpful

  • Drag And Drop in ALV Column Tree

    Hello All,
    Can anyone tell me the method used for  a drag and drop in a column tree....
    i found it for a simple tree but not for a column tree.....
    thanks in advance....
    Regards,
    Praveen

    Check the links -
    drag drop required for alv column!
    drag and drop in a tree
    Drag&Drop within the Tree
    Drag&Drop within a tree
    Drag and drop in ALV tree
    Regards,
    Amit
    Reward all helpful replies.

Maybe you are looking for

  • Red/redcode/ cameras in general

    Hi, I want to buy a new high end camera, I was looking at panavision genisis and the sony fw900(i think thats what it's called) but then I came across RED. Although this is still expensive with the accesories It isn't as expensive as the others. I wa

  • Abend POALogging Process

    Hi all, Running GW8.0.2 on NW6.5.8. Have turned off logging in the .poa file (/logdiskoff option uncommented), as well as setting the logging level of the POA object to "Off". And yet we had a rash of abend GWPOA-Logging Process abends last night whe

  • Problem with ipf.

    Hi, I have a rather troublesome issue with the solaris 10 IPF. I configure everything via the system admin instructions, adding my interface card to the /etc/ipf/pfil.ap file (I checked I had the right card using ifconfig -a): "e1000g0 -1 0 pfil" and

  • Error download when trying to download config for music [ios 7 beta 6]

    I recieve an error when i try to download the music/video config for ios 7 beta 6. Any ideas?

  • Project in CMOD

    Hi When I create a project in CMOD and try to write a code in 'INCLUDE'. A message pops up saying 'ZX...are reserved for includes of exit function group. Take Care