Drag Drop List to List

I have a source list and a destination list. I want to submit
the contents of the destination list via my sendformdata function
along with the other formitems.
Here are my source/dest lists.
<mx:VBox dropShadowEnabled="true">
<mx:Label text="Available Loops"/>
<mx:List id="srclist" width="300" height="150"
allowMultipleSelection="true"
dragEnabled="true" dropEnabled="true"
dragMoveEnabled="true" labelField="category"
dataTipFunction="myLabelFunc" showDataTips="true"
alternatingItemColors="[#ece8ff, #ffffff]">
</mx:List>
</mx:VBox>
<mx:VBox>
<mx:Label text="Patched Loops"/>
<mx:List alternatingItemColors="[#ece8ff, #ffffff]"
id="destlist" width="200" height="150"
allowMultipleSelection="true"
dragEnabled="true" dropEnabled="true" dragMoveEnabled="true"
labelField="category"/>
</mx:VBox>
user drags one or more items from the source to dest list.
This works great.
Now I need to pass the dropped/selected data in destlist to
myobj, along with the other form items. How?
<mx:Script>
<![CDATA[
private function sendFormdata():void {
var myobj:Object = new Object();
myobj.name = myname.text;
myobj.email = myemail.text;
myobj.entry = myentry.text;
myobj.entrycomment = myentrycomment.htmlText;
myobj.selectedcats= destlist.????
cfdataInsert.addData({user:myobj})
]]>
</mx:Script>
Second part of my question is that I want the value of
myobj.selectedloops to be a comma separated list of categoryid
numbers (e.g. 1,3,5). My query, that populates the source list via
the remoteobject contains categoryid,category, and description
columns. I currently display the category in the labelField of the
list, but I need to submit the categoryid to the DB.
data comes from...
<mx:RemoteObject
id="cfdata" showBusyCursor="true"
destination="ColdFusion"
source="da8.Constellation.entries">
<mx:method name="getCats" result="getCats_result(event)"
/>
</mx:RemoteObject>
getCats ColdFusion function...
<cffunction name="getCats" access="remote"
returntype="query">
<cfset var CatData = "">
<cfquery name="CatData" datasource="#DSN#">
select categoryid,category,description
from Categories
order by category
</cfquery>
<cfreturn CatData />
</cffunction>
and then this function populates the srclist with the
data....
public function getCats_result(event:ResultEvent):void
srclist.dataProvider = event.result as ArrayCollection;
destlist.dataProvider =[];
How do I pass the resulting destlist categoryids to
myobj.selectedcats ?
I don't know how the ArrayCollection organizes the query and
how to reference the categoryid in the srclist and destlists.
I'd appreciate any help.
Thanks,
Don

SAP has lots of demo reports for drag and drop functionalities. Please check [Drag & Drop With the ALV Grid Control|http://help.sap.com/saphelp_erp2004/helpdata/en/22/a3f5fbd2fe11d2b467006094192fe3/content.htm]

Similar Messages

  • Strange UI sticking issue with drag/drop and JList

    Hi all,
    I have implemented drag/drop between a jtree and jlist. The jtree can accept drops from the jtree (nodes to other parent nodes) and from the jlist. The jlist can accept nodes of the tree being dropped on it.
    Let me say this much, it all works. Works fine and great. BUT, the purpose of my post is I am seeing a very strange and not easily reproducible problem.
    I should first say that after a successful drop, the list removes the selected items. I do support drag/drop for multiple items.
    When I drag items from the list to the tree, reasonbly normal (not too fast), everything seems to work every time. But if I drag an item quickly from the list to the tree, for some reason after the items are removed from the list, another item is selected, sometimes NOT in the place of where the item(s) were selected. Infact, when I drag quickly, I notice the selection changes in the list itself. I only accept tree objects being dropped in the list, so there is no ability to drag/drop list items onto itself, and thus if I drag a list item around the list normally, nothing changes..the item I am dragging stays selected and the cursor shows the drag arrow.
    So this problem seems seems odd. I can reproduce it fairly easily, but only when I click and drag quickly.
    Anyone have ideas? I don't see where in my list code that as I drag, when drop is done, etc that I select anything in the list. I have tried JDK 1.4.1 and 1.4.2 and it does it in both. I don't see a bug in the bug database for it, and I am not sure its a bug in the JVM or my own code!
    Any help is appreciated. Can't really post code as its a large set of code and it is dependent on our company project, so it would take some time to take the code out into its own app to test it again.

    Hi,
    +" Please note that dropSite==null is a legal value for collection components. dropSite=null and DropOrientation==ON indicates that the drop has happened outside the data portion of the collection component and should be treated as a drop on the entire component Also note that dropSite==null and DropOrientation==AFTER indicates that the drop has happened on an empty collection component and the user intends to append the data."+
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10684/oracle/adf/view/rich/event/DropEvent.html#getDropSite__
    List dropRowKey = (List) dropEvent.getDropSite();
            //if no dropsite then drop area was not a data area
            if(dropRowKey == null){
                return DnDAction.NONE;
            }Frank
    Edited by: Frank Nimphius on Feb 18, 2011 11:18 PM

  • Change items' order in a list by drag-drop

    Hi, Is it possible to allow the user to change the items displayed in a List by just drag-&-drop?
    Thanks.

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

  • Strange Problem Drag & Drop Between Lists

    In the following code, drag & drop is set to copy objects, but when more than one instance of an item exists, only the last item (highest data provider index) item can be selected. Any idea why this is happening, and how to correct this?
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      creationComplete="init();">
      <mx:Script>
        <![CDATA[
          import mx.collections.ArrayCollection;
          [Bindable] private var srcAC:ArrayCollection = new ArrayCollection();
          [Bindable] private var destAC:ArrayCollection = new ArrayCollection();
          private function init():void{
            srcAC = new ArrayCollection(['Fish', 'Meat', 'Chicken']);
            destAC = new ArrayCollection();
          private function displayData():void{
            trace("****************************************");
            trace("menuList dataProvider:");
            for each(var srcItem:Object in srcAC){
              trace("\t" + srcItem.toString());
            trace("----------------------------------------");
            trace("orderList dataProvider:");
            for each(var destItem:Object in destAC){
              trace("\t" + destItem.toString());
        ]]>
      </mx:Script>
      <mx:HBox>
        <mx:VBox>
          <mx:Label text="Today's Menu" fontWeight="bold" fontSize="14"/>
          <mx:List id="menuList" width="200" dataProvider="{srcAC}"
            dragEnabled="true" dropEnabled="true" dragMoveEnabled="false"
            allowMultipleSelection="true" fontSize="14"/>
        </mx:VBox>
        <mx:VBox>
          <mx:Label text="Your Order" fontWeight="bold" fontSize="14"/>
          <mx:List id="orderList" width="200" dataProvider="{destAC}"
            dragEnabled="true" dropEnabled="true" dragMoveEnabled="false"
            allowMultipleSelection="true" fontSize="14"/>
        </mx:VBox>
      </mx:HBox>
      <mx:Button id="b1" label="Reset Order" click="init();"/>
      <mx:Button label="Display Data Providers" click="displayData();"/>
    </mx:Application>

    Hello
    Actually I have also face this problem in one of my appliocation so have done some work arround for that.
    If we use object of ArrayCollection as 'key-value' (like- {label:'Fish'} ) pair than it work fine.
    srcAC = new ArrayCollection([ {label:'Fish'},{label:'Meat'},{label:'Chicken'}]);
    In case of
    srcAC = new ArrayCollection(['Fish', 'Meat', 'Chicken']);
    If we drop same item two times than list is not identify unique item of the list
    and if we use objet like- {label:'Fish'} than every item is unique for list.
    I m not sure this is right or not but it works fine.
    Also we need to set 'labelField' of list as per object.
    With Regards
    Virat Patel

  • Drag & Drop, call a method if list changes.

    Hi there,
    I have two spark lists,backed up by Array Collections, both of which accept drag & drop either to move objects between them or to reorder within the lists. I have a method which is called on drop which resets some properties of the object to 0, this works as expected...
    protected function list_dragDropHandler(event:DragEvent):void
         if(event.action != DragManager.NONE)
              var item:Object = event.dragSource.dataForFormat("itemsByIndex")[0];
              item.someProperty = 0;
                    item.someOtherProperty = 0;
    What I would like to do is only call this method only when the objects are moved to another list, currently it is called when I reorder within the same list too, could someone please point me in the right direction with this?
    Many Thanks,
    J.

    Ned,
    Thanks for your prompt reply, you gave me the idea I needed here. As I'm dragging things about by their item renderers a creationComplete is fired when they end up in new places, I used a mouseDown event (This happens when one drags, it's as good an event as any to use I guess) to grab the current list and I compare that to the list I get when creationComplete fires. These are stored in the object and compared by the dragDrop event handler...
    Probably an inelegant take on what you were suggesting, but it works...
    J.

  • Refresh dragProxy in List component built-in drag & drop feature

    Hi,
    I'm using the built-in drag & drop feature of the List component. Everything works fine except one thing. The itemRenderer I use in my List contains many TextInput that the user can fill. The problem is when I drag an itemRenderer to reorder my list, the dragProxy of the itemRenderer doesn't show the text I enter in the TextInput; it shows the original state of my itemRenderer.
    Is there any way to update the dragProxy to reflect the changes made in the itemRenderer ?
    Thank you!
    Matetnic

    If editable=true, the user's changes should be saved to the dataprovider when the drag starts.  The dragproxy renders whatever is in the dataprovider item
    Alex Harui
    Flex SDK Developer
    Adobe Systems Inc.
    Blog: http://blogs.adobe.com/aharui

  • Populare value drop list

    Hello I have a combobox that has 4 item (example: A, B, C, D) This drop list I have specified the values 1, 2, 3, 4
    people a second combobox but I can not pass values
    I need these values for a xml file
    you know how can I do??
    var combo1 = xfa.event.change;
    var combo2="droplist2";
    var combo3="droplist3";
    var combo4="droplist4";
    //delete item
    mod.delete (combo2);
    mod.delete (combo3);
    mod.delete (combo4);
    // array
        objK = new Array();   
        objK[0]="A";
        objK[1]="B";
        objKe[2]="C";
        objK[3]="D";
        for (var i=0; i<objK.length; i++){
    if(objK[i] != combo1){
            droplist2.addItem(objK[i]);

    Hi Reema,
    We are using ZCI type of form. So, I dont think there is any need to run the report for ZCI_Update.
    And the display type of Interactive Form in ABAP WebDynpro is 'NATIVE' which is the same we dragged the control from (WebDynpro Native).
    Is there any work around to display search helps on ADOBE Interactive forms apart of this control?
    Appreciate your quick answer.
    Thanks & Regardss,
    Sandip Kamdar

  • I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as how to resolve this issue

    I bought an I pad 2 from us but I can not activate the Facetime in UAE(Dubai)as I can not see the country in the I pad's  drop list, anyone has an idea as to how to resolve this issue

    I'm not that familiar with how FaceTime works. I know how to set It up but I don't use it. I just know that you can't activate in the UAE. I believe that you can activate in any country that permits it's use. Whether you will need a new ID or not, I can't confirm.
    You can Google this and get all sorts of articles on workarounds. Apparently if you set up a VPN you can use it in the UAE. Here is one article that I found.
    http://talkfree7.blogspot.com/2010/09/how-to-facetime-voip-call-from-uae.html
    I Googled "workaround for FaceTime in UAE" to find this.

  • Drop List in ALV Report

    Hi!.
    I need create a dinamyc drop list for a field in a ALV List report. for example...
    IF the field in the alv = 1, i must show a list with the values '2' and '3', but in the case of the value is = '4' i must show a list with the values '1' and '2'. it's just an example.
    I think that i must do by coding, but i don´t know how..
    I'm waiting for your answers..
    Thanks!! for your help!

    Check this Sample code
    BCALV_EDIT_07
    it exactly behaves the way you want.

  • How to lengthen the drop list view in form page selection?

    Hi All,
    Looking at 11.1.2.1 Planning, it's annoying that I can only see 10 members at a time when scrolling through the page drop list in forms:
    http://www.stanford.edu/~mikeling/drop_list_screenshot.jpg
    In 9.3, one is able to see a much longer list.
    Is there a way to globally customize the length of viewable members in the dropdown, so that I see 20 or 30 members at a time, for example?
    Mike
    Edited by: user1123980 on Feb 3, 2012 11:10 AM

    did you change it with the Application owner login(log in id using which the application created) and save it after making the change.
    it is working absolutely the way you are expecting in my system. i login with Admin id and made the changes and saved it and my serch box incresed with number of members.
    -KP

  • RE: Viewable Items on a Drop List in Forte V2

    Hi Kumar,
    Let me guess, you're using windows NT 4.0 as your client.
    I had the same problem a few months ago and raised the
    question in this list.
    My answer is as brief as it is unsatisfying:
    It is a known bug for which there is no work around.
    Forte 2 and NT 4.0 don't mix very well. Forte 3 works fine.
    You think you found some logic behind the bug, but you
    haven't. I just so happened it works this way for these
    droplists in this window. Other droplists in other windows
    will not follow this logic. Some won't even show the bug.
    These are your choises:
    Don't use NT 4.0
    Switch to Forte 3
    Don't use droplists
    Use some tricks, like adding an empty row at the end
    of the list.
    Pascal Rottier
    STP - MSS Support & Coordination Group
    Philip Morris Europe
    e-mail: [email protected]
    Phone: +49 (0)89-72472530
    +++++++++++++++++++++++++++++++++++
    Origin IT-services
    Desktop Business Solutions Rotterdam
    e-mail: [email protected]
    Phone: +31 (0)10-2428100
    +++++++++++++++++++++++++++++++++++
    /* My reality check bounced */
    -----Original Message-----
    From: Kumar Krishnasami [SMTP:[email protected]]
    Sent: Friday, March 05, 1999 5:30 PM
    To: [email protected]
    Cc: Kumar Krishnasami
    Subject: Viewable Items on a Drop List in Forte V2
    I have a set of drop lists that are part of an array field which are
    populated dynamically. If I set the number of viewable items to n,
    and
    if the drop list has m number of items in it, the number of items
    that
    actually appear is n-1 if the list contains more than n items( m>n)
    and it is m-1 if the list contains less than n items (m<n).
    For example, if I set the number of viewable items to 4 and a drop
    list contains 7 items, the actual number of viewable items I see is 3
    (4-1) whereas if the drop list contains 2 items, the actual number of
    viewable items I see is 1 (2-1).
    I searched through the archive of this list and found that this same
    issue was raised before, but couldn't find any replies pertaining to
    it.
    Is this a "feature" of Forte V2? I tried the same thing with Forte V3
    and it does work fine in V3.
    Any pointers would be appreciated.
    -- Kumar Krishnasami.
    p.s:- It doesn't matter how I set the viewable items. I tried both
    setting them through the windows workshop as well as in the code
    after
    the self.Open() in the Display() method. The behavior is the same in
    both cases.
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>-
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    On Wed, 28 Jan 1998 11:50:42 +0000, [email protected] wrote:
    I have noticed that Drop List widgets show an initial value equal to
    the first value in their Element List. However, this does not seem
    to happen as soon as the Drop List is placed inside a grid with a
    mapped type. In this case, the drop list shows a blank value
    initially. Once a value is selected from the drop down list, it
    always has a value.I have found the following behaviour to be true of DropLists with an
    object mapped type (ie, TextData as opposed to string): If you
    instantiate the mapped attribute in the Init() method (ie,
    self.theDroplist = new()), then the DropList will display the first
    item in the list as selected when the window comes up. If however, you
    do NOT instantiate the mapped attribute, then you get the behaviour you
    are observing where the DropList defaults to showing nothing until the
    user makes a selection. It's kind of an odd behaviour, but you can
    take advantage of it in cases where you want to force something to be
    selected by the user, but you don't want an initial default.
    Dale
    ================================================
    Dale V. Georg
    Systems Analyst
    Indus Consultancy Services
    [email protected]
    ================================================

  • How to make hidden Drop Lists functional in RBList Subforms?

    I have created a form that contains 3 isolated Radio Button lists, each with hidden subforms that are unique per each button.
    Two of my RBLists and subforms work perfectly, showing hidden Drop Down List options and other fields as they should when a button is selected.
    However, RBList3 presents the Drop Down lists as user entry fields only. Each hidden subform in RBList3 contains one drop down menu and one text box for instructions.
    I've used the same javascript to hide/show hidden fields when buttons are selected. All settings seem to match up. Here is a sample of my code:
    if(RBList3.F.rawValue != 2) 
        this.presence = "hidden";
        newsubform.presence = "hidden";
    else if(RBList3.F.rawValue == 2)
        this.presence = "visible";
        newsubform.presence = "hidden";
    Does anyone have any suggestions for how to make my Drop Down Lists in RBList3 show as functional Drop lists?
    I have attached the form for reference.

    See example #62 on my blog for a 10.1.3 example:
    http://tinyurl.com/smuench-adf-examples
    For a tutorial on how to create them using the new features we enable in 11g, see my Oracle Magazine article:
    Defining Cascading List of Values

  • [svn:fx-trunk] 10943: Fix to dragging from List with multiple-selection

    Revision: 10943
    Author:   [email protected]
    Date:     2009-10-08 15:46:27 -0700 (Thu, 08 Oct 2009)
    Log Message:
    Fix to dragging from List with multiple-selection
    - The fix is to postpone the selection commit until we make sure the user has not started a drag gesture.
    - Exclude the dragEnabled, dropEnabled, dragMoveEnabled properties for DropDownList
    QE notes: None
    Doc notes: None
    Bugs: None
    Reviewer: Deepa
    Tests run: checkintests, mustella List, DropDownList
    Is noteworthy for integration: No
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as
        flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as

  • Operations not sorted in the drop list of the web service endpoint

    Hello,
    Since the beginning of oc4j standalone till the last release 10.1.3.5.0, the operations in the drop list of the web service endpoint are not alphabetically sorted,
    they are in a random order.
    If a web service contains a lot of operations, it's always difficult to find one operation in the list.
    How can this list be sorted ?
    I don't see any sort option in the web service properties (in Jdevelopper) or in the deployment descriptor (in Jdevlopper).
    Best regards
    Laurent

    You are correct...the above code is useful only when debugging in Visual Studio.  You should have better luck with either of the following two options:
    Option 1: Retrieve the id from the response of SaveChanges()
    sc.AddToSampleList(new ServiceReference.SampleListItem { Title= "Hello World" });
    System.Data.Services.Client.ChangeOperationResponse response = sc.SaveChanges().FirstOrDefault() as System.Data.Services.Client.ChangeOperationResponse;
    int id = ((ServiceReference.SampleListItem)((System.Data.Services.Client.EntityDescriptor)response.Descriptor).Entity).Id;
    Option 2: Create the list item and access its properties after calling SaveChanges()
    ServiceReference.SampleListItem li = new ServiceReference.SampleListItem { Title= "Hello World" };
    sc.AddToSampleList(li);
    sc.SaveChanges();
    int id = li.Id;

  • How to make table that will include controls such as drop list?

    How to make table that will include controls such as drop list?
    I need to create table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...

    Hi Nadav,
    I figured out where I missed your point. When you wrote
    table as Property Browser of ActiveX, that include rows with differnt types such as drop list, color, ...
    I was thinking mixed data-types in a [2d] table!
    Looking at the property browser again it looks like no single LV function can do all of that. It can be developed as a pop-up (like the browser is set-up) and then code all of the elegance using an event structure to control the background color of a string indicator while controling the visability of rings that are only made visable when a mouse down is detected. That will get you pretty close.
    So no, my previous response ws not correct for what you are trying to do if you want to duplicate all of the wistles and bells of the property browser pop-up window.
    Please forgive my distraction.
    Ben 
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

Maybe you are looking for

  • XSLT mapping: namespace

    Hi, I have a problem with my XSLT mapping... My scenario is <b>file to IDoc</b> (Orders05) and I use xsd schemes as external definitions. When I test my mapping in the Interface mapping I don't get any values in the target IDoc. I think it's a proble

  • CS5.7 cannot open CS5.5 Indesign files

    Hi, we have several designers located around the globe, that all need to be able to access & change the same design files, mostly Indesign.  They are all using Applemacs, but all have different CS versions, i.e. CS5.5, 5.7 and 6.8.0.1.  We already ha

  • How to remove ?xml version="1.0" encoding="UTF-8"? in receiver payload

    hi experts,     how to remove <?xml version="1.0" encoding="UTF-8"?> from receiver payload. my source srtucture is , <?xml version="1.0" encoding="UTF-8"?> <ns0:entity-data xmlns:ns0="http://www.xxx.com"> <Customer> <CustNo>xxx</CustNo> </Customer> <

  • After updating my iphone 4 to iOS 6 messages send and receive very slow. How can I fix this?

    After I updated my phone iOS 6, my messages take way longer than normal to send and be recieved. I need to know how to fix this before I go crazy.

  • Portal adds "=" in URL jump

    Dear forumers, I'm facing a strange problem, i'm not able to resolve: When defining a jump on a BI query to a document placed in the content server, the jump doesn't work. After analyzing the problem, i found out that the portal adds an "="  (=equal