Drag and Drop using iterator in ADF 11.1.1

I am looking for a workaround for the following problem.
<af:componentDragSource> returns an incorrect dragComponent value when dropped on a dropTarget when container elements are generated by an iterator.
Below is sample code:
in jspx file:
                     <af:panelGroupLayout>
                         <af:outputText value="Drag object 1"/>
                         <af:componentDragSource discriminant="activity"/>
                         <f:attribute name="draggedActivity" value="Drag object 1"/>
                     </af:panelGroupLayout>
                     <af:panelGroupLayout layout="horizontal" id="dropTarget1" inlineStyle="background-color:#ffff00">
                         <af:spacer height="8px"/>
                         <af:outputText value="Drop target 1"/>
                         <af:spacer width="600px"/>
                         <f:attribute name="dropTarget" value="Drop target 1"/>
                         <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                             <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                         </af:dropTarget>
                     </af:panelGroupLayout>
                     <af:panelGroupLayout>
                         <af:outputText value="Drag object 2"/>
                         <f:attribute name="draggedActivity" value="Drag object 2"/>
                         <af:componentDragSource discriminant="activity"/>
                     </af:panelGroupLayout>
                     <af:panelGroupLayout layout="horizontal" id="dropTarget2" inlineStyle="background-color:#ffff00">
                         <af:spacer height="8px"/>
                         <af:outputText value="Drop target 2"/>
                         <f:attribute name="dropTarget" value="Drop target 2"/>
                         <af:spacer width="600px"/>
                         <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                             <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                         </af:dropTarget>
                     </af:panelGroupLayout>
                     <af:panelGroupLayout>
                         <af:outputText value="Drag object 3"/>
                         <f:attribute name="draggedActivity" value="Drag object 3"/>
                         <af:componentDragSource discriminant="activity"/>
                     </af:panelGroupLayout>
                     <af:panelGroupLayout layout="horizontal" id="dropTarget3" inlineStyle="background-color:#ffff00">
                         <af:spacer height="8px"/>
                         <af:outputText value="Drop target 3"/>
                         <f:attribute name="dropTarget" value="Drop target 3"/>
                         <af:spacer width="600px"/>
                         <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                             <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="activity"/>
                         </af:dropTarget>
                     </af:panelGroupLayout>
                    <af:spacer height="16px"/>
                    <af:iterator var="item" first="0" varStatus="stat" rows="0"
                              value="#{projectToolbarBean.narrativeBean.testDnD}">
                        <af:panelGroupLayout>
                            <af:outputText value="Drag object #{item}"/>
                            <af:componentDragSource discriminant="test"/>
                            <f:attribute name="draggedActivity" value="#{item}"/>
                        </af:panelGroupLayout>
                        <af:panelGroupLayout layout="horizontal" id="dropTarget1" inlineStyle="background-color:#ffff00">
                            <af:spacer height="8px"/>
                            <af:outputText value="Drop target #{item}"/>
                            <af:spacer width="600px"/>
                            <f:attribute name="dropTarget" value="#{item}"/>
                            <af:dropTarget actions="MOVE" dropListener="#{projectToolbarBean.narrativeBean.dropTest}">
                                <af:dataFlavor flavorClass="javax.faces.component.UIComponent" discriminant="test"/>
                            </af:dropTarget>
                        </af:panelGroupLayout>
                     </af:iterator>In bean:
    public Collection getTestDnD() {
        List items = new ArrayList<Integer>();
        items.add(1);
        items.add(2);
        items.add(3);
        items.add(4);
        items.add(5);
        return items;
    public DnDAction dropTest(oracle.adf.view.rich.event.DropEvent event) {
        if (event.getDragComponent() != null && DnDAction.MOVE.equals(event.getProposedAction())) {
            UIComponent dropComponent = event.getDropComponent();
            UIComponent dragComponent = event.getDragComponent();
            String dropped = "";
            String dragged = "";
            if(dropComponent.getAttributes().get("dropTarget") instanceof String){
                dropped = (String) dropComponent.getAttributes().get("dropTarget");
                dragged = (String) dragComponent.getAttributes().get("draggedActivity");
            else if(dropComponent.getAttributes().get("dropTarget") instanceof Integer){
               dropped = dropComponent.getAttributes().get("dropTarget").toString();
               dragged = dragComponent.getAttributes().get("draggedActivity").toString();
            System.out.println("The label of the dragged object is: " + dragged + ". the drop target is " + dropped);
            return DnDAction.MOVE;
        } else {
            return DnDAction.NONE;
    }Drag a 'drag object' from the hard coded top group and drop it on a yellow drop target in the same group.
Output from System.out will be correct.
Do the same for the second iterator-generated group. You will find that the 'dragged' value in the bean code returns the same value as the 'dropped' value. In other words, event.getDragComponent() is losing context and is replaced by the value of event.getDropComponent().
Can anyone help fix or workaround this problem? I cannot replace the iterator with a forEach due to other requirements.
Does anyone know if this issue exists in ADF 11.1.2?
Thanks

Sorry 1 correction on my earlier post.  Install iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16) NOT 12.1.0.71!
Thanks Guys!  This fixed me up.
I uninstalled
- All  Apple Packages
- Bonjour
- iTunes
- Quick Time packages
Deleted the Apple, iTunes, & Quick Times folders:
- c:\Program Files
- c:\Program Files (x86)
- C:\Program Data
- C:\Users\%profile%\AppData\Local
- C:\Users\%profile%\AppData\LocalLow
- C:\Users\%profile%\AppData\Roaming
Rebooted
Sorry 1 correction on my earlier post.  Install iTunes 12.0.1.26 for Windows (64-bit) - iTunes64Setup.exe (2014-10-16) NOT 12.1.0.71!
Installed the newest QuickTime 7.7.6
and Bingo!  Hopefully the next iTunes release addresses the issue moving forward.
Thanks Again!

Similar Messages

  • How do you drag and drop using mac laptop?

    how do you drag and drop using mac laptop?

      As said above, you can click down, ons use the other finger to drag the object.  I had turned on the setting to use three-finger drag, so you can drag objects with three fingers.  To change gesture settings, go to the system preferences>trackpad.  Here you can also see all of the gestures of Mac OS X.

  • I have a 5th gen iPod Touch. I have made playlists in iTunes. I need to get them to the iPod. When I had a Classic, it was automatic. You could drag and drop using iTunes music to the playlist in iTunes and it would automatically sync to the Classic.

    I have a 5th gen iPoc Touch. In the past, with the Classic, I could drag and drop from my iTunes music to a Classic playlist through iTunes. Now, the playlist I create in iTunes doesn't show on the Touch. I have maybe 29 GB of music on my Touch. I have already created playlists in iTunes that have substantial amounts of songs in each. How can I get those playlists on the Touch without doing a total sync that wipes the iPod? Is there a way to do it?
    As well, I am noticing here that my 5th gen iPod doesn't show as a registered device. How do I register it?

    For how to sync see:
    iTunes: Syncing media content to iOS devices and iPod       
    Try syncing using the manual method                
    Managing content manually on iPhone, iPad, and iPod
    This may also help:
    Adjusting to iTunes 12

  • Drag and Drop using Components[

    Hi,
    As anyone used Drag and Drop for components? I mean, allowing the user to drag and drop a component around a container? Just curious, so far from what I've seen, the only things that can be dragged/dropped are properties of a given object, such as 'text" from a JLabel.
    thanks

    IMHO, you don't need fancy drag and drop features to do that. Implementing MouseInputListener and listening for mouseDragged is a good start. Then setting the component's bounds depending on the location of the mouse at the mouseReleased event (wrt the starting offset) could be a good idea (if you're using absolute positioning, of course).
    From there, it all depends on what you want it to look like during the "transfer". You could, for instance paint the component in a BufferedImage at the start of the D&D and then paint the image with transparency as the mouse is moving.
    Camickr had an interesting post that might help you :
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=492100

  • Drag and Drop using Windows Explo

    Hi, I have a Zen Touch 20GB with firmware upgraded to version 2..0. I understand that it is possible to drag and drop files using windows explorer to the mp3 player. However, whenever I try to copy a folder containing audio files I always get a error stating that I don't have the permission to copy the audio files. I am able to copy other non- music files well and I have administrati've rights. Is this problem due the fact that audio files must reside within the default Music folder within the mp3 player? Can anyone kindly help me on this issue? Thanks a lot.

    yes but there must be a folder for music only ex:
    ----------------------------------explorer------------------------------------------------
    file View edit tools HElp WINDOWS
    FOLDER ... FOLDER.... FOLDER
    hard.. dri'ves
    C:ICON... D:ICON... OR... F:ZEN
    OR.
    OTher
    .zen. ..pretend.. this ..is ..the ..icon
    -subfolders
    ... - .MUSIC. ... .DATA. .ROOT.
    .. you should
    .. drag ur music into music \ data goes in\ and right here im guessing
    \ data folder\ is were ur contacts are
    and yah //Message Edited by kickenchicken on 07--2006 09:54 PM

  • Macbook pro won't drag and drop using mountain lion

    Since installing mountain lion. I have been unable to drag and drop.selected items just stay stuck to the cursor and when positioned where they need to go the item will not drop. the only way to correct this seems to be by pressing escape command and the trackpad which then returns the item to its original position. this has only happened since I installed mountain lion OS X  it is getting very annoying. My model is a mid 2009 15 inch laptop MacBook Pro which has 8 GB of RAM, I have noticed that other people seem to have the same problem but have been using an installed item called LapLink display I do not this have,so this is not causing the problem. any help to resolve thiswould be much appreciated.

    I now seem to have solved the problem after reading various solutions. The one that works for me is to to put the laptop to sleep and on reawaking the machine works as it should.
    Grant

  • Imovie - how to import MP4 video clip for editing ? Wont drag and Drop ; using OSX on macbook

    the Video just flies back onto desktop.

    It should only have to do the full search the first time. From then on it should be quick.
    Since yours is not, I would suspect that iMovie is not able to write the results of the search, so the next time it has to start from scratch. This could be a permissions issue.
    Go to Disk Utility and try to repair permissions on your main hard disk.
    You might also try trashing preferences. (Details here - https://discussions.apple.com/docs/DOC-4061 )

  • More info on using drag and drop in AS3?

    I have coded a basic drag and drop using a rope .jpg saved as an mc. the idea is to have the user drag the rope from left to right using the mouse down and up functions. I was able to do this but I'm trying to add to the functionality by doing the following:
    dragging limited to a certain amount per drag
    no dragging up or down just left to right
    set boundries within the screensize
    I've looked and could only find as2 and basic tutes on this
    here is what I have so far
    any help?
    ropeclip_mc.addEventListener(MouseEvent.MOUSE_DOWN, ropedrag);
    ropeclip_mc.addEventListener(MouseEvent.MOUSE_UP, ropedrop);
    function ropedrag(e:MouseEvent):void
         ropeclip_mc.startDrag();
    function ropedrop(e:MouseEvent):void
         ropeclip_mc.stopDrag();
    RD

    Hi,
    Along with your code add this code to specify the dragging limited.
    var sbound:Rectangle = new Rectangle(x,y,width,height);
    x  states x position of the drag object starts.
    y  states y position of the drag object starts.
    width states width of the drag object.
    height states height of the drag object
    ropeclip_mc.startDrag(true,sbound);
    Try this.
    Saransoft

  • Drag and drop components

    hi folks,
    am using jdev 11.1.1.5.0 - adfbc.
    when am i wondering about drag and drop components in ADF 11g.
    i get some of the example.
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/60-table-drag-n-drop-sample-176981.pdf
    http://www.baigzeeshan.com/2011/01/drag-and-drop-collection-in-oracle-adf.html
    http://www.baigzeeshan.com/2010/07/implementing-drag-and-drop-functionaly.html
    http://www.gebs.ro/blog/oracle/adf-drag-and-drop-hints/
    http://www.gebs.ro/blog/oracle/oracle-adf-overcome-adf-restrictions-on-copying-components-with-drag-n-drop/
    ok fine. is there any other links. make more interactive in UI
    need is :
    make my user to feel free use my application.

    What about the product documentation ?
    http://docs.oracle.com/cd/E23943_01/web.1111/b31973/af_dnd.htm#CIHCHGIF
    Also, the following book:
    has a chapter (chapter 14) on drag and drop
    http://www.amazon.com/Oracle-Fusion-Developer-Guide-Applications/dp/0071622543/ref=sr_1_cc_1?s=aps&ie=UTF8&qid=1343975521&sr=1-1-catcorr&keywords=Oracle+Fusion+Developer+Guide
    Frank

  • Autoscrolling in a DropTarget (Drag and Drop)

    I have implemented Drag and Drop using DropTargets and a DragSource And DragGestureListener.
    The DropTarget I have is a customized JComponent. How can I make the DropTarget autoscroll for Drag and Drop events??

    Have you tried adding a MouseMotionListener to the target component and checking to see if the mouse coordinates are near the edge of the viewable area?

  • Autoscrolling in the DropTarget (Drag and Drop)

    I have implemented Drag and Drop using DropTargets and a DragSource And DragGestureListener.
    The DropTarget I have is a customized JComponent. How can I make the DropTarget autoscroll for Drag and Drop events??

    Have you tried adding a MouseMotionListener to the target component and checking to see if the mouse coordinates are near the edge of the viewable area?

  • Drag and Drop functionality for SVG charts.

    Has anyone been able to get a drag and drop functionality with charts?
    I've read where Vikas was able to accomplish this with reports, but, unfortunately, it was an old post and his example is no longer available.
    I understand that this is more on the browser/presentation layer rather than the back-end, but, judging from the replies from the mainstays in this forum along similar lines, I'm hoping someone may have accomplished this already.
    I'm trying to get this to work for a "dashboard" type application I'm trying to prove out using HTMLDB.
    Your responses are appreciated.
    Thanks

    Hello,
    I've done drag and drop using the Adobe SVG Viewer before in a whiteboard application built on top of ... you guessed it... Apex. Unfortunately I do not have an example I can share with you but I know it can be done because I did it, trust me ;) . I am planning on building out that application as an application anybody can download and use but unfortually it will be bit.
    Your best bet at the moment is looking on google http://www.google.com/search?q=svg+drag+and+drop there are quite a few examples.
    Oh also look at this file in the images directory /images/javascript/svg_js_includes/svg_common/oracle.svgNodes.js it has quite a few helper functions and that file is included in every chart by default so there are functions you can use, (no drag and drop unfortunalty)
    If you have can lock down the users in your environment to use only Firefox or Safari you can look at canvas as well it's pretty handy and can do alot of the same stuff
    http://developer.mozilla.org/en/docs/Drawing_Graphics_with_Canvas
    and of course some simple examples in Apex
    http://apex.oracle.com/pls/otn/f?p=11933:78 (it runs on keypress in the textarea I use it to mess with Canvas constructs)
    Carl
    Message was edited by:
    Carl Backstrom

  • Drag and Drop for the tableview

    Can drag and drop used for a row in the tableview, how to do it?

    try this ;) ( i work on FXML project)
    @FXML
    TableView<String> tableView;
    private  ObservableList<String> tableContent = FXCollections.observableArrayList();
    tableView.setOnMouseClicked(new EventHandler<MouseEvent>() { //click
                    @Override
                    public void handle(MouseEvent event) {
                            if(event.getClickCount()==2){ // double click
                                String selected = tableView.getSelectionModel().getSelectedItem();
                                if(selected !=null){
                                    System.out.println("select : "+selected);
    tableView.setOnDragDetected(new EventHandler<MouseEvent>() { //drag
                @Override
                public void handle(MouseEvent event) {
                    // drag was detected, start drag-and-drop gesture
                    String selected = tableView.getSelectionModel().getSelectedItem();
                    if(selected !=null){
                        Dragboard db = tableView.startDragAndDrop(TransferMode.ANY);
                        ClipboardContent content = new ClipboardContent();
                        content.putString(selected);
                        db.setContent(content);
                        event.consume();
    tableView.setOnDragOver(new EventHandler<DragEvent>() {
                    @Override
                    public void handle(DragEvent event) {
                        // data is dragged over the target
                        Dragboard db = event.getDragboard();
                        if (event.getDragboard().hasString()){
                            event.acceptTransferModes(TransferMode.COPY_OR_MOVE);
                        event.consume();
    tableView.setOnDragDropped(new EventHandler<DragEvent>() {
                    @Override
                    public void handle(DragEvent event) {
                        Dragboard db = event.getDragboard();
                        boolean success = false;
                        if (event.getDragboard().hasString()) {           
                            String text = db.getString();
                            tableContent.add(text);
                            tableView.setItems(tableContent);
                            success = true;
                        event.setDropCompleted(success);
                        event.consume();
                });  

  • 1.4 Drag and Drop - lost icons when added my own TransferHandler

    I've been trying to implement drag-and-drop using a custom TransferHandler on JDK 1.4.
    When I use the system default TransferHandler, I get nice icons that indicate whether the drop is allowed or not. Once I implemented my own TransferHandler, all I get is a dim grey outline when I drag -- the icon doesn't change when I drag to an area where acceptDrag() is being called versus one where rejectDrag() is being called. (I've got println's in the code so I can verify the accept/reject calls are happening, but the icon never changes).
    It would be extra nice if the icon indicated whether a COPY or MOVE operation was selected, and toggled the icon appropriately.
    From other messages in this forum, it appears that the getVisualRepresentation() method of TransferHandler is never called, so that would not help.
    I don't really need customized behavior here; I'm just trying to get back the behavior I saw with the default TransferHandler. Any suggestions?
    Thanks!
    Mike Yawn

    I've been trying to implement drag-and-drop using a custom TransferHandler on JDK 1.4.
    When I use the system default TransferHandler, I get nice icons that indicate whether the drop is allowed or not. Once I implemented my own TransferHandler, all I get is a dim grey outline when I drag -- the icon doesn't change when I drag to an area where acceptDrag() is being called versus one where rejectDrag() is being called. (I've got println's in the code so I can verify the accept/reject calls are happening, but the icon never changes).
    It would be extra nice if the icon indicated whether a COPY or MOVE operation was selected, and toggled the icon appropriately.
    From other messages in this forum, it appears that the getVisualRepresentation() method of TransferHandler is never called, so that would not help.
    I don't really need customized behavior here; I'm just trying to get back the behavior I saw with the default TransferHandler. Any suggestions?
    Thanks!
    Mike Yawn

  • Drag and drop a image from html page into flex

    how can i drag a image form the html page and drop it into
    the flex application.

    Hi,
    There's no direct support for this. But you could implement
    drag and drop the way you normally would in javascript. Except
    here, on mouseUp over a div encapsulating the object or embed tag
    (the flash object), you'll need to make a call into actionscript
    from javascript indicating that a drag and drop happened.
    For more info, see
    how
    to drag and drop using javascript and
    actionscript
    and javascript communication

Maybe you are looking for

  • How can I get my library to show on a different computer?

    My own laptop is broken. I can use another laptop to access my iTunes account. That laptop already has its own iTunes account, but that doesn't have all my songs on, so I'd like to access my own iTunes library. I can sign in to iTunes on this laptop,

  • Payment on Account for A/R invoice

    Hello Experts,                                  I want to create payment on Account for A/R Invoice through DI API .                                  The Status of A/R Invoice should get closed. Please Suggest Regards Manish

  • Table or FM:  Taxes in PO

    Hi All. In PO we have tab  'ÏNVOICE'.In this tab we have button for 'TAX'.Say TAX CODE is V1. It display all taxes applicable. Can any one tell in which table I can get this data or any function module

  • Publisher "link to this report" throwing js error

    When viewing a report I'm getting a javascript error when trying to click "Link to this report": 'reportLinksMenu' is not defined. Anyone else having this issue?

  • Want to share more than just a public folder

    I am running Tiger (10.4.11) on my PowerMac and I want to share more than just my public folder. Now I read several support documents from Apple suggesting that if I want that my only option would be giving out full root access to my guest user. I am