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

Similar Messages

  • 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

  • Drag and drop activities from component palette does not work properly

    I have problems with dragging and droping activities from component palette to bpel designer. I follow an sample to combine BPEL proces with Business role engine and try to drop decide activity bellow receiveInput activity but it is not picked up. Clicking on receiveInput activity and chosing with right mouse buttom insert after, decide activity is not in selection choise.

    Hi,
    I don't know what is causing the problem, but I have been able to avoid it by starting Jdeveloper from $home\jdev\bin\jdev.exe.
    Regards,
    Mathias

  • How to drag and drop a swing component that can make it behave like Visio.

    1) How to make a JComponent drag and drop that behave like visio? I understand it's possible to drag and drop a text or image, but no idea on how to do that on JComponent. 2) After the JComponent is dragged and dropped, how to make the JComponent to be able to resize by the user using mouse 3) The area that the JComponent dropped should it be GrassPane, LayerPane, or ContentPane?

    I see where you're going. I'm drawn to Thunderbird because it puts open emails in separate tabs, which makes finding a particular open message easier than searching the task bar for an open outlook message. I do see your point that tab happy programmers, probably too young to remember how cool we thought drag and drop was when it first came out, don't think much of it. As with a lot of software, each programmer has a very limited view of how it their program should be used vs how it is actually used in the wild.
    People work in different ways. When I schedule an appointment with a client, this is often preceded by a series of emails related to whatever the client wants to discuss. I drag and drop those messages into the appointment window so that on the date of the appointment, I have a nice neat summary of the issues right there in the appointment window. I could use workarounds (save email and then attach to the appointment), but that's like a trip back to Windows 3.0 and it's, if I'm not mistaken, 30+ years later. I guess I'll continue to use Tbird for email and outlook for calendar, not my preferred solution, I'd like to flip MS the bird and cut all ties to outlook, and was hoping Tbird was the solution. Not yet, and perhaps not ever, based on your thoughts.

  • Drag and Drop inside JTable: what draws the 'insert' line during the drag?

    I'm trying to reconfigure a rather complex table with a fair number of custom renderers to include drag & drop of rows for resorting the table. Everything is working great, except that as I drag the rows there is no indication of the current insert point (i.e. the line that appears between rows). When I make a simpler table I see the line... I'm not sure what aspect of my current table is blocking this function. I'm writing in the hope that can someone can direct me to the method(s) responsible for drawing this line.
    Thanks!

    To elaborate a bit for anyone who might read this. I inquired with the Substance developers and they hope to support this feature in v5.1 (which requires SE6), but have no plans to update v4.3 (the last release before a switch to SE6).
    Also, I'd still be grateful for any info pointing me to the Swing methods that draw the drag line.

  • Drag and drop custom object

    Hello,
    I am trying to create a GUI where the user will be able to drag an object (which I have created) from a toolbar button onto a JPanel. I have tried the sun tutorials to no avail. I am unsure exactly what code I should be writing to enable this functionality. I have written a dragmouseadapter which enables drag and drop from the button. I have also written a TransferHandler and Transferable for the object, but again I'm not sure how I should be using these. Can anyone advise me? Hopefully in a sort of step-by-step instruction for setting this up. Thank you.

    You wanted to drag and drop a custom component and you said its done using dragmouseadapter!
    TransferHandler and Transferable are used to transfer the data between the swing components.
    Now, what you want to do? So, we can help!

  • Help with this ... using drag and drop

    Hi guys,
    I'm an intermediate user of Flash, but I'm stuck ... I'm
    trying to see if I can recreate this page in Flash for a friend
    (it's an awful site!):
    Mannequin
    There are two ways I thought I could do this ... as they've
    done it, you cycle through the items, click on an item and it will
    appear in a hierarchy on the mannequin ... or as I've tried to
    attempt it, by dragging the item onto the mannequin.
    This is EXTREMELY rough as I just wanted to see if it could
    be done before designing it all, so it's stick men I'm afraid! I've
    got two movieclips on the stage, one is the console and one is the
    mannequin. The console contains items of clothing which are each
    movieclips placed in their own frame, back and forward buttons and
    an add button (ignore that button).
    I've managed to set it up so that the item of clothing
    duplicates and you can drag it onto the mannequin. I have two
    problems ... the mannequin goes back to normal when I go through
    the items in the console and the items in the console appear on top
    of each other as you flick through (probably because of the
    duplicatemovie command).
    I want to be able to drag each item, establish a hierarchy on
    the mannequin (e.g. so a jacket will go over a top) ... I've
    searched this forum for drag and drop info and have seen references
    to specifying a target, but I'm stuck. I've got a feeling I'm on
    the right lines, but I've either laid it out wrong on the stage or
    I'm missing a vital piece of actionscript ... Please can anyone
    advise??? Thanks
    Test Mannequin
    Flash File

    Hi,
    It would help if you could give some more details:
    - what are you trying to do (drag and drop a whole component, drag an item within a tree, or a table, drag an item from one component to another?)
    - have you found the modules you need in the unbound modules?
    - have you read the documentation about the drag and drop actions? can you say which parts you're having problems with? The documentation is here. You'll have to select the component you are interested in and locate the action "drag" and the action "drop" to read about the parameters required.
    Best regards,
    Alex

  • Drag and Drop FileBrowse​r

    I would like to select files from a FileBrowser Tree window (filebrowser.fp) by the Drag -n- Drop method in my GUI. I want to drag a file in the filebrowser, to pull it over a Textbox, and to drop it, so the path and/or the filename appears in the Textbox. I found only one example for 'drag and drop', but it doesnt help, it shows me how to drag-and-drop inside a Tree box, with child items, and so on. (I cannot implement what I saw there due to I am still quite a beginner in LabWin.)
    Could somebody give me a short example how to manage this, or a link with an example?
    Thank you very much,
    best regards,
    András B-D.

    Sorry
    ABD

  • No drag and drop iTunes 12?

    I have always just dragged an album, song or playlist to a device when it's plugged into iTunes. Now with 12 I cannot. The only intuitively way (and I say that jokingly) is to go to my phone, turn on "Show all music" and then download the album. This is HORRIBLE and NOT intuitive by any means if this in fact how you have to do it now. Am I missing something?

    Problem is not doing Drag and Drop inside of iTunes - it's from iTunes music library to an iOS device. It's a feature that's there but does not work as it used to. It's like Apple took it away and for got to tell anyone. I've been using MAC products for a long, long time and lately I am getting concerned about the 'quality' of updates and products. Apple was always known for it's quality........quality.........quality. Now............not so sure.

  • 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 :(

  • 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 external text into a Flex component

    Hi,
    is there any way to allow drag and drop of external text (for
    example, selected text from another browser or even from the
    address bar) into a Flex component like TextArea? I know how to
    drag and drop between two different Flex components but in this
    case, the source is external. There must be something I can do to
    TextArea like its dragdrop property to allow this feature... any
    help would be greatly appreciated.
    Thanks,
    Josh

    Short answer: Yes, as long as it is an AIR app.
    Browser-based Flex apps do not have access to
    ClipBoardFormats, so I'm not sure it is possible to do what I think
    you want to do -- have a web-based Flex app that allows you to drag
    and drop selected text from other apps. Most possibly because of
    the security sandbox that the Flash player runs in.
    However, if you wanted to do it in an AIR app, I built this
    as an example for you (you can view a "cleaner" version with proper
    indents at
    http://pastebin.com/f741cbac8
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    creationComplete="initDandD();" width="500" height="600">
    <mx:Script>
    <![CDATA[
    public function initDandD():void {
    addEventListener(NativeDragEvent.NATIVE_DRAG_ENTER,
    onDragIn);
    addEventListener(NativeDragEvent.NATIVE_DRAG_DROP,
    onDragDrop);
    private function onDragIn(e:NativeDragEvent):void {
    if(e.clipboard.hasFormat(ClipboardFormats.TEXT_FORMAT)) {
    NativeDragManager.acceptDragDrop(this);
    private function onDragDrop(e:NativeDragEvent):void {
    var myString:String =
    e.clipboard.getData(ClipboardFormats.TEXT_FORMAT) as String;
    myTextArea.text = myString;
    ]]>
    </mx:Script>
    <mx:TextArea id="myTextArea" width="326"
    height="262"/>
    </mx:WindowedApplication>

  • Drag and Drop, dropping to a parent component.

    I've been searching high and low for a solution to a problem without any success. I'm hoping someone here might have a suggestion.
    I have an application (written using Java 5.0) which allows dragging and dropping custom components between JPanels. My components themselves are JPanels with other components in them such as JTextFields. I've written custom TransferHandlers for my components and all works well. If I drag one of my components and drop it on the receiving panel, it works. If I drag and drop on an existing one of my components, the drop works since the components themselves don't support dropping (the drop is accepted by the parent JPanel).
    My problem occurs when I inadvertently do a drop onto a text component within one of my components. In this case the drop is rejected since the text component doesn't accept my Transferable. What I would like to happen is have the drop passed up to a containing panel that does accept the Transferable.
    I can't disable drop on the text components as I'd like them to still accept string drops.
    Is there another solution that will allow a parent (or more generally an ancestor) of a component to accept a drop rejected by a child component?

    "bmilesp" <[email protected]> wrote in
    message
    news:gnd5c7$jas$[email protected]..
    > hello,
    >
    > I've been searching on how to add drag and drop
    functionality to an hbox.
    > You're probably thinking "just use a tilelist", and
    that's what i'm
    > currently
    > using, but the tilelist cannot align items to the
    center, which is crucial
    > in
    > my application (if you need me to explain further i
    will, but i don't
    > think
    > it's relevant here).
    Sure it can.
    > So i need drag and drop on an Hbox. The repeater is
    necessary because the
    > hbox
    > may need to be populated with items initially, which can
    later be dragged
    > and
    > dropped either in itself (to re-arrange items) or into
    another hbox of
    > this
    > kind. For the past few hours I've been trying to find
    anything that can
    > even
    > hint at this type of functionality (i've been searching
    and experimenting
    > for
    > hours). If anyone can point me in the right direction,
    i'd appreciate it.
    > Thank
    > you very much. -b
    http://www.quilix.com/node/3

  • 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 - detecting drop away from a component

    Flex 4, AIR 2.0 app
    I have a drag and drop detecting a Button drag away from a Group1 into Group2.
    When the user drops into a Group2, the Button is added to it, which obviously removes it from Group1.
    I would like it that if the user drags away from Group2 and drops it randomly on the screen, the Button will be added back into Group1.
    Does anyone have any ideas as to how I might go about detecting the end of a drag when not over a component, so I can add the button back into Group1 again?
    Hope that makes sense!!!

    Thanks Ronnie,
    I'll have a look at gthis as it looks a bit more efficient than the solution I have come up with.
    The only thing I'm not sure about is at what point my Button gets put back into Group1.  In my current movie, I have a function which handles the dragDrop event.  But if I drop outside a component, I don't have an event from which I call the handleDrop(dragEvent) function.
    I'll have a look.
    In the meantime, what I'm doing is Making my drag item a custom component, passing a reference to it's default container (Group1) and its Default X and Y co-ordinates.
    Then, I have a dragComplete handler which is called whenever the drag item is released - I then check the action property of the event and if it is "none" I know it has been dropped outside a recognised target and I can add it back into its default group and set its default x and y coordinates.  This seems to work quite nicely at the moment.
    so, my code in the Drag Button looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Button xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:s="library://ns.adobe.com/flex/spark"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        mouseDown="mouseDownHandler(event)"
        dragComplete="dragCompleteHandler(event)">
    <fx:Script>
      <![CDATA[  
       import mx.core.DragSource;
       import mx.core.IUIComponent;
       import mx.events.DragEvent;
       import mx.managers.DragManager;
       public var _defaultParent:Object;
       public var _defaultX:Number;
       public var _defaultY:Number;
       protected function mouseDownHandler(event:MouseEvent):void
        // the drag initiator is the object being dragged (target of the mouse event)
        var dragInitiator:IUIComponent = event.currentTarget as IUIComponent;
        // the drag source contains data about what's being dragged
        var dragSource:DragSource = new DragSource();
        // ask the DragManger to begin the drag
        DragManager.doDrag( dragInitiator, dragSource, event, null );
       protected function dragCompleteHandler(event:DragEvent):void
        // TODO Auto-generated method stub
        //trace("Drag complete!");
        //trace("target = " + event.target);
        //trace("action = " + event.action);
        if (event.action != "none"){
         trace("woo!");
        }else{
         trace("put the drag label back into its original position");
         if (event.target.parent != _defaultParent){
          trace("put it back, you monster!");
          _defaultParent.addElement(event.target);
          event.target.x = _defaultX;
          event.target.y = _defaultY;
         }else{
          trace("ah... it's already in the right place... actually!");
      ]]>
    </fx:Script>
    </s:Button>

Maybe you are looking for

  • Getting Item Text  from sale order items

    Hi All, I am trying to get sale order item text using Include text in smartforms. my text object  is VBBP and my text id is 0004. What should I pass in Text Name  ?.---Order Number or Item Nunmber or Both. If both can you guys explain how to pass bot

  • Why is the thumbnail images placed in different order than the xml?

    Hi all! This same code I have asked about before, and got excelent help, but this is a different problem so I just start a new thread. This is a code that open a XML file, containing a small list of images, and place them as thumbs on the page. It ki

  • Authorization check of Tcode FCH7 (reprint check) / FCHN (display check)

    Hello to you all, Does any of you know of an option of extended the authorization check of Tcode FCH7 (reprint check) / FCHN (display check) using authorization object F_BKPF_BEK / F_LFA1_BEK? Regards, yoav Bernstain

  • Can i call a HTTP Post method in ABAP or XI?

    Hi All, Can you please let me know how to call a HTTP Post method in ABAP or XI? my HTTP Post is looks like (HTML form) <form action="http://111.111.111.1:8080/sample_url" method="POST"> <table> <tr><th>applicationId</th><td><input type="text" name="

  • Displaying taxonomy folders which contain at least one resource.

    Hi all, I'd like to display in KM Navigation iView folders from taxonomy structure which contain some classified document. For example I have structure like this: My_taxonomy -Folder1 - contains classified documents -Folder2 - empty -Folder3 - contai