Drag and Drop UI in WD Java CE 7.2

Hi
In CE 7.11 we get DragItemListBox and DropItemListBox UI elements in Webdynpro Java to implement the drag-drop functionality.
I suppose this has been enhanced with the CE 7.2 release. But I am not finding the proper way or tutorial to implement the drag-drop functionality in WD in CE 7.2.
Please suggest the ways to implement this.
Thanks and Regards,
Sayan Ghosh

Hi Robin / Pradeep,
Thanks for the suggestions. What I found out was from CE 7.11 EPH1, the Drag and Drop feature was introduced. That time it was limited to ItemListBox.
With the release of CE 7.2, this feature has been majorly advanced. Like you can have DragSourceInfo UI elements from dragging from an image, table, ItemListBox, tree and so on... and a corresponding DropSourceInfo UI element where we can drop the dragged elements. The tag value of a particular DragSourceInfo and DropSourceInfo should be same.. so that u can drop the dragged items. Once dropped, the DropSourceInfo can fire an onDrop event where u can do all ur logic.
Moreover there is also something called DropTarget UI which basically provides a Container under that which can hold any UI element. The entire container under the DropTarget UI element is the drop area. We just need to to add a DropSourceInfo under that and provide the proper tag name and use the onDrop event.
Regards,
Sayan Ghosh

Similar Messages

  • Drag and Drop functionality in webdynpro java

    Hi,
        Please check this article
    [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0fec52a-abad-2b10-48b8-cbdfd0dbca62]
    Thanks and Regards

    Hi raman,
    Such kind of drag and drop feture is only supported with CE 7.1 Eph1 onwards. if you have CE 7.1 Eph1 then you will also see these 'dragsourceinfo' and 'droptargetinfo'.
    Please check teh version of your installation.
    If you dont have CE 7.1 then I am afraid that you cannot implement any such feature using webDynpro. At maximum what you can do is create a browse and collect pattern, which will allow you to select multiple values from one table(Browse Table) and transfer that to other table (Collect Table). We also have many such screens which require multiple selection from one item list to other. And we follow the same technique.
    I hope this solves your issue. Please revert back if you require any other help or kindly close the thread.
    Thanks and Regards,
    Pravesh

  • Drag and Drop to native desktop

    I'm working on drag and drop functionality to and from the user's computer. I have the "from" part working just fine, it's the "to" part that is stumping me. The idea for this applet is that it represents a file structure that is up on a remote server, so none of the files are local. If the user drags a file in, I can easily start an upload to push the file up to the server. However, when the user drags an item from the applet to their desktop or whatever folder, the only way to get this to work is to mimic a file, even though there is no file. What I would like to do is have a droptarget listener set up for the OS that will do everything I normally do within the applet (accept the drop, download the file, store it to the appropriate location). unfortunately, i haven't found any documentation on how this could be done. it looks like the OS wants a List of file objects that it simply copies to whatever destination you drag to. I don't see a way to capture where the file is being dropped, or how to maybe place a dummy file while the download is in progress and then replace the dummy file with the real file. Any advice or direction would be greatly appreciated.

    i'm not sure i get the JavaScript references...
    possibly i can re-phrase the problem in a much simpler fashion that could possibly solve my problems. In a drag-and-drop operation from a java application to the native OS, is there any way to know the context of where your transferable data is going? for instance, is there a way to know that the component i'm dragging is going to the Desktop versus "My Documents"?
    If there is a way, I could do some back-door coding so the user appears to be instantly get the file, while in the background the file is actually downloading and will replace the 'dummy' file when the download completes.
    Is that possible?

  • Drag and drop Firefox issue

    I've encountered a rather annoying problem with drag and drop. Firefox will always accept a drop of a custom component! For example run and drag and drop in firefox:
    http://java.sun.com/docs/books/tutorialJWS/uiswing/dnd/ex6/DragPictureDemo.jnlp
    Do you know anyway to prevent this (I know IE does not accept the drop...)?
    Thanks very much for any input!

    I have an applet in a webpage that will accept drag
    and drops, however, if a user mistakingly drops into
    the browser page and not the applet, the drop is
    consumed, which is bad especially if you want an
    action to occur whenever a drop happens...
    :(Okay, but the applet provides a target area. So how is it any different from dropping said content on any other app that's in a background window? Make sure the drop area is visually obvious.
    Of course, if Firefox is taking this to be a file to show and then unloading the applet, that is not ideal. But I personally would not worry about such a thing happening that I felt a need to jump thru hoops to find a solution.
    In my opinion this would be a Firefox bug, but was
    wondering if there is a Java workaround. I guess I
    could tell people to just use IE.....You could restrict to IE other ways too, but I really don't see the point. I don't know any other way to change the type except what you already posted. FireFox does support running Java from within Javascript, so this might be a side effect of that.
    Message was edited by:
    bsampieri

  • Rearranging rows by drag-and-drop

    I have a program that, at one point, uses a JTable (presenting the meta-data of a group of fields) with draggable columns that control the order in which the fields are presented on another screen.
    It's been a few years since I was even in that part of the code. And inded, a few years since I've tinkered with a JTable at all.
    Is there a way (short of subclassing and re-implementing large portions of JTable) to make the rows of a JTable rearrangable by dragging and dropping?

    [url http://java.sun.com/docs/books/tutorial/uiswing/dnd/intro.html#complex]Extending Default DnD Support

  • I am unable to drag and drop image files in a JAVA supposrted site. I have all the lastest versions of softwarte here - everything is up to date.

    I am no longer able to drag and drop image files int this JAVA supported site. It had always worked flawlessly in the past.
    I would open the site, go to Send Files, allow access, fill out the fields and then drag and drop my image files. Now I can only use the ADD (+) button to do so.
    I have the latest versions of OS-X Lion and JAVA installed on my computer
    http://www.clippingprovider.com/CP_II_EU/Welcome.html

    This is the Tech Sheet on the subject:
    Photoshop Help | Managing paths
    It contains this item under Manage Paths:
    When you use a pen or shape tool to create a work path, the new path appears as the work path in the Paths panel. The work path is temporary; you must save it to avoid losing its contents.
    Ok, the red you referred to is a Stoke you added. Then QuickMask is not involved.

  • Safari for Mac, webpage with Java applet, drag and drop area not working.

    At my company, we have a web page that our users access to submit media files, (QuickTime, Audio, images...), for transcoding for delivery.  The web page consists of a java applet, with an area that our users drag and drop media file into.
    After updating to Safari 5.1.2, the applet will not work anymore. Instead, the browser will "open" the quicktime and play it, instead of allowing the Java Applet to do it's job.
    CAN I TURN THIS FUNCTIONALITY OFF??
    I read that Safari 5.1.2, (when it was initially released), broke something with the THEN current version of Java, and everyone was awaiting the latest update (build 1.6.0_29) to fix it. Unfortunately, this update did not fix my issue with the functionality of dragging and dropping media files into the web page.
    It seems to me, as if, there is an over-arching functionality setting (or something) that needs to be either turned off, or in some other way DE-prioritized.
    Anyone have any ideas?
    Safari 5.1.2
    MacOS 10.6.8
    MacBook Pro

    Thanks for quick reply and help. I am able to drag multiple files but this is giving problem in case of filename with spaces like "abc def.png". Can you please put some thoughts on this.
    DataFlavor uriListFlavor = new DataFlavor("text/uri-list;class=java.lang.String");
                   Reader in = (Reader)t.getTransferData(DataFlavor.plainTextFlavor);
                   BufferedReader br = new BufferedReader(in);
                   String uriStr;
                   while ((uriStr = br.readLine()) != null)
                       URL url = new URL(uriStr);
                       String category = GalleryUtils.contentsPanel.getCurrentCategoryPath();
                       GalleryUtils.generateILPFromFile(new File(url.getFile()), category);
                   }Thanks
    Kanni

  • Drag and Drop and java.io.NotSerializableException

    I have been implementing some code to essentially allow me to drag and drop from one JTree to another. The requirement was to be able to drag multiple nodes at one time and drop them on the other JTree in the order selected.
    I was getting a java.io.NotSerializableException when I was in the drop code in the destination jTree and could not figure out what was going on. Basically, I was wrapping all the objects that i wanted to transfer in a custom ArrayList subclass that implemented transferable. The NotSerializableException was was indicating that the object in the JList was not serializable.
    If you are getting a NotSerializableException and you have defined a custom DataFlavor like so:
    public static DataFlavor DATATYPE_TRANSFER =
            new DataFlavor(
               TransferableImplementor.class,  //  make sure that this is the class that implements transferable
                "Datatype Information");make sure that the .class is indeed the class that implements the transferable interface (and not some other random .class). You can be led down a wild goose chase on trying to make sure every object in your Transferable implementor class is serializable, when the problem lays in the DataFlavor instantiation.
    Nik

    If you haven't already read these, here are a couple of good sources for DND tree implementation details.
    http://www.javaworld.com/javaworld/javatips/jw-javatip97.html
    http://www.javaworld.com/javaworld/javatips/jw-javatip114.html

  • Drag and Drop between two java applications

    Hi,
    I am trying to implement drag and drop between two instances of our java application. When i drop the content on the target, the data flavors are transmitted properly, but i get the exception :
    java.awt.dnd.InvalidDnDOperationException: No drop current
         at sun.awt.dnd.SunDropTargetContextPeer.getTransferData(SunDropTargetContextPeer.java:201)
         at sun.awt.datatransfer.TransferableProxy.getTransferData(TransferableProxy.java:45)
         at java.awt.dnd.DropTargetContext$TransferableProxy.getTransferData(DropTargetContext.java:359)
         at com.ditechcom.consulbeans.TDNDTree.drop(TDNDTree.java:163)
         at java.awt.dnd.DropTarget.drop(DropTarget.java:404)
         at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:547)
    How can i fix this ?
    Thanks a lot,
    Karthik

    Play with this;-import java.awt.*;
    import java.awt.datatransfer.*;
    import java.awt.dnd.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.io.*;
    // Credit to bbritna who I stole it from in the 'New To ..' Forum
    public class DragComps implements DragGestureListener, DragSourceListener,
                                         DropTargetListener, Transferable{
        static final DataFlavor[] supportedFlavors = { null };
        static{
              try {
                  supportedFlavors[0] = new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType);
              catch (Exception ex) { ex.printStackTrace(); }
        Object object;
        // Transferable methods.
        public Object getTransferData(DataFlavor flavor) {
               if (flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType))
             return object;
               else return null;
        public DataFlavor[] getTransferDataFlavors() {
               return supportedFlavors;
        public boolean isDataFlavorSupported(DataFlavor flavor) {
               return flavor.isMimeTypeEqual(DataFlavor.javaJVMLocalObjectMimeType);
        // DragGestureListener method.
        public void dragGestureRecognized(DragGestureEvent ev)    {
               ev.startDrag(null, this, this);
        // DragSourceListener methods.
        public void dragDropEnd(DragSourceDropEvent ev) { }
        public void dragEnter(DragSourceDragEvent ev)   { }
        public void dragExit(DragSourceEvent ev)        { }
        public void dragOver(DragSourceDragEvent ev) {
               object = ev.getSource(); }
        public void dropActionChanged(DragSourceDragEvent ev) { }
        // DropTargetListener methods.
        public void dragEnter(DropTargetDragEvent ev) { }
        public void dragExit(DropTargetEvent ev)      { }
        public void dragOver(DropTargetDragEvent ev)  {
               dropTargetDrag(ev); }
        public void dropActionChanged(DropTargetDragEvent ev) {
           dropTargetDrag(ev); }
        void dropTargetDrag(DropTargetDragEvent ev) {
               ev.acceptDrag(ev.getDropAction()); }
        public void drop(DropTargetDropEvent ev)    {
               ev.acceptDrop(ev.getDropAction());
                   try {
                       Object target = ev.getSource();
                      Object source = ev.getTransferable().getTransferData(supportedFlavors[0]);
                       Component component = ((DragSourceContext) source).getComponent();
                       Container oldContainer = component.getParent();
                       Container container = (Container) ((DropTarget) target).getComponent();
                       container.add(component);
                       oldContainer.validate();
                       oldContainer.repaint();
                       container.validate();
                       container.repaint();
                   catch (Exception ex) { ex.printStackTrace(); }
                   ev.dropComplete(true);
        public static void main(String[] arg)    {
              JButton button = new JButton("Drag this button");
              JLabel label = new JLabel("Drag this label");
              JCheckBox checkbox = new JCheckBox("Drag this check box");
              JFrame source = new JFrame("Source Frame");
              Container source_content = source.getContentPane();
              source.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              source_content.setLayout(new FlowLayout());
              source_content.add(button);
              source_content.add(label);
              JFrame target = new JFrame("Target Frame");
              Container target_content = target.getContentPane();
              target.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              target_content.setLayout(new FlowLayout());
              target_content.add(checkbox);
              DragComps dndListener = new DragComps();
              DragSource dragSource = new DragSource();
              DropTarget dropTarget1 = new DropTarget(source_content,
              DnDConstants.ACTION_MOVE, dndListener);
              DropTarget dropTarget2 = new DropTarget(target_content,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer1 =
              dragSource.createDefaultDragGestureRecognizer(button,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer2 =
              dragSource.createDefaultDragGestureRecognizer(label,
              DnDConstants.ACTION_MOVE, dndListener);
              DragGestureRecognizer dragRecognizer3 =
              dragSource.createDefaultDragGestureRecognizer(checkbox,
              DnDConstants.ACTION_MOVE, dndListener);
              source.setBounds(0, 200, 200, 200);
              target.setBounds(220, 200, 200, 200);
              source.show();
              target.show();
    }[/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Drag and Drop - Java -- other application

    Hi,
    I'm writing an application, which requires to transfer the content of textfields through Drag and Drop to any other application.
    Basically this works, but in combination with some applications, e.g. Mozilla, it happens, that the DragSourceListener doesn't recognize, that the Drag and Drop - operation is finished.
    Because of this I get an InvalidDnDOperationException, when I try to start a new Drag and Drop - operation.
    Can anyone tell me, how to solve the problem?
    thanks in advance
    Christoph

    And I get the:
    java.lang.NullPointerException
         at oracle.jbo.uicli.jui.JUPanelBinding.bindUIControl(JUPanelBinding.java:808)
         at empapppack.empframe.jbInit(empframe.java:116)
         at empapppack.empframe.<init>(empframe.java:51)
         at emppapppack.Application1.<init>(Application1.java:13)
         at empapppack.Application1.main(Application1.java:50)

  • Drag and drop file onto java app

    Hi,
    I would like to drag and drop a file from windows explorer onto a panel in my java app.
    All I need is that when the file is 'dropped', I can get a reference to the path of file.
    e.g.
    There is a file, C:\myFile.txt
    There is a String in my program called 'filePath'.
    I start my java app and dnd the file onto it.
    I want the path of the file to be assigned to the filePath String.
    I can then do more proccessing on the file which I already know how to do.
    Can anyone help.
    Thanks,
    Jim

    Tristan,
    I am stuck in the same place. Perhaps we could work on this together.
    I am trying to drag a single item from a JList to a text editor, Word, etc. I have two problems:
    1) I can't seem to get just the item in the JList to drag. It wants to drag the entire JList component.
    2) How does one define the remote application as the drop target? Have not found any examples either.
    Is the drop target actually the system clipboard?
    Rp

  • Drag and drop of Windows icons inside Java......possible ?

    Hi all !
    does anybody know if it's possible to do drag and drop of windows icons (like folders) into Java Frames or other containers ?
    I'd like to write an application where the user can drag Windows folders inside a Frame/Container and collect Folder information (the path to the folder)
    Is it possible to do it ?
    Thanks a lot
    Francesco

    Hi,
    It is possible.
    You can drag platform independent objects like folders, icons etc. from the native platform to your java app.
    The Java-Object you need in this case is a
    DataFlavour like
    DataFlavor.stringFlavor // for text
    DataFlavor.javaFileListFlavor // for folders
    in the tutorial jacob has linked you find more about this.
    Olek

  • Drag And Drop Java Portlets

    Hi,
    How can we develop Drag and Drop (DnD) Portlets. Does Oracle Portlet provide such functionality.Can someone guide me or have any documentation on how to create Java Portlets that can be dragged arround i.e. just like on google site http://www.google.com/ig. I am using 10.1.0.4. Thanks

    Is there any kind of documentation available as how to build this kind of functionality. What API's to use. Lifefray and StringBeans Portal provides DnD functionality so curious if it's also doable using Oracle Portal and if so how to start on it. I am more interesetd in docs. and API's to use for building our own.
    Thanks

  • PDF XFA form/internet browser/JAVA application/Drag and Drop

    Hi guys,
    I need to be able to open a PDF XFA form (a PDF document where I have some input controls and javascripts for validation) inside a JPanel.
    If this is not doable am thinking if i can open this pdf form in a web browser by launching it from my java application.
    And when I do this, I want to be able to drag and drop between the java application and the browser.
    Anyone can tell me if that is doable?
    Thanks and Regards,
    Rawad

    Tristan,
    I am stuck in the same place. Perhaps we could work on this together.
    I am trying to drag a single item from a JList to a text editor, Word, etc. I have two problems:
    1) I can't seem to get just the item in the JList to drag. It wants to drag the entire JList component.
    2) How does one define the remote application as the drop target? Have not found any examples either.
    Is the drop target actually the system clipboard?
    Rp

  • Java script- drag and drop

    Can i use java scripte to do a drag&drop interface?I want to move a picture(.jpg or.gif) to anywhere on ie.

    There are drag and drop functions in DHTML that you can use in Javascript :
    ondrag
    Fires on the source object continuously during a drag operation.
    ondragend
    Fires on the source object when the user releases the mouse at the close of a drag operation.
    ondragenter
    Fires on the target element when the user drags the object to a valid drop target.
    ondragleave
    Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
    ondragover
    Fires on the target element continuously while the user drags the object over a valid drop target.
    ondragstart
    Fires on the source object when the user starts to drag a text selection or selected object.
    ondrop
    Fires on the target object when the mouse button is released during a drag-and-drop operation.

Maybe you are looking for

  • My remote iPad keyboard stopped working

    My remote iPad  keyboard stopped working

  • Postfix error after update to 10.6.8

    Dear readers and admins After I did update SLS from 10.6.7 to 10.6.8, I got a problem with postfix smtp server. I did google around and found some note, that it is a problem, that a launchd org.postfix.master is running and thath's why the com.apple.

  • Recipients can't open plain text email attachments

    I know this should be a no-brainer, and maybe the toddler running around in the background here and my pressing job hunt is preventing me from seeing the obvious, but I'm having trouble sending out my resume as a plain text attachment from my iMac ma

  • Slideshow into PDF file?

    I thought I saw an example showing how to create a small slideshow and then convert or save as a PDF file for e-mailing? Now, I'm having a brain cramp and cannot duplicate the process. Was I dreaming or can we do this in Encore (or maybe Premiere Pro

  • Fatal Error when trying to update BB

    Ok, trying to keep short.  System worked.  Running 4.7 on desktop with outlook 07 on Vista.  UPdated desktop to V.6.  Would no longer recognize any of my 200+ media files.  So I reinstalled 4.7.  Now I can upload my media, but it will not sync with t