How Do You Populate Dropdown Lists?

I am having a problem when I fill more than one drop down list (using DropDownByIndex).  What happens is I have 2 that I want to fill.  It seems to be leaving a big space in each one where the values for the other one would be filled in.  So for example, the first one has a big space at the end, and the second one has a big space at the beginning.
Here is the logic I am using to fill:
String firstList[]={"One","Two","Three"};
String secondList[]={"Four","Five","Six"};
for(int i=0;i<firstList.length;i++){
   IPrivateBlah.IDataElement ele=wdContext.createDataElement();
   ele.setFirstList(firstList<i>);
   wdContext.nodeData().addElement(ele);
for(int i=0;i<secondList.length;i++){
   IPrivateBlah.IDataElement ele=wdContext.createDataElement();
   ele.setSecondList(secondList<i>);
   wdContext.nodeData().addElement(ele);
Any ideas why this is happening?

Ok, here a short tutorial. There are two kinds of dropdown lists: *ByIndex and ByKey.
To fill a DDByKey, create a DDIC type using the type editor and add enumeration values (and descriptions)
Example:
Create DDIC type "ShirtSize" with enum values ("S", "Small"), ("M", "Medium"), ("L", "Large")
Create context attribute "selectedSize" of type "ShirtSize"
Data binding: DropDownByKey.selectedKey -> selectedSize
Now, the dropdown list will display "Small", "Medium", "Large" and if you select for example "Large", the context attribute "selectedSize" contains value "L".
DDByIndex works differently. I think your problem is solved more easily with DDByKey.
Armin

Similar Messages

  • How do you get a list of your contacts nick names and their phone numbers on line and print them out?

    How do you get a list of your contacts nick names and their phone numbers on line and print them out?  I've been trying to figure out how to get the list to print out but I can't even find a complete list to view on Verizon's web site.  Does anyone know how to do this?

    Log into your online account. In the, 'I want to', box type, Manage Contacts.
    Place your cursor over any contact, a pop screen will appear with the option to print your contacts

  • How do you turn a List into a String?

    Hi,
    Have a simple question for all of you out there, hope you can help:
    How do you turn a list of words into a string?
    For example:
    List matchList = new ArrayList();
    matchList.add(word 1);
    matchList.add(word 2);
    matchList.add(word 3);
    String s = matchList(all of the words)How is this possible?

    but how would i go about doing that? Thats what i am
    askingIf you don't know how to iterate over a list, see this tutorial: http://java.sun.com/docs/books/tutorial/collections/If you don't know how to use StringBuffer, it should be somewhere in one of the links under Resources for Beginners at http://www.thejword.com/3.html#beginner_resources

  • Excel 2007. OLAP pivot. How do you resize dropdown width and height?

    Excel 2007. OLAP pivot. How do you resize dropdown width and height?

    hi,
    I'm afraid we can't modify that property in Excel. Someone had suggested to use a custom combo box to replace the built-in drop-down. However it will lose the features which are only available
    for built-in drop-down.
    Hope this
    thread will give you some ideas. Thank you.

  • How do you print the list of songs from a songlist in I-Tunes that you burn to a blank CD for the cover of a CD case?

    How do you print the list of songs from a songlist in I-Tunes that you burn to a blank CD for the cover of a CD case?

    Click the playlist in iTunes.  Then go to File > Print ...
    One of the options you will see to print is "CD Jewel Case Insert".  That's just what you want!

  • How do you alphabetalize a list?

    how can you alphabetalize a list in pages/

    On a Mac you use Word Services.
    I don't know of any method on Pages for iOS other than copy the text and paste into a Table and see if you can sort it there, then copy it back out.
    Peter

  • How do you print a list of bookmarks which includes addresses and properties?

    How do you print a list of bookmarks which includes addresses and properties?

    Which properties do you want included?
    See also:
    *[[/questions/748417]]

  • How do you find a list of computers authorized on your account?

    How do you find a list of computers authorized on your account?  Also if the computers are no longer available how can you de-authorize them?

    "How do you find a list of computers authorized on your account? "
    There is no list.
    "  Also if the computers are no longer available how can you de-authorize them?"
    You cannot, nor do you need to, until you reach the limit of 5.  At that point you can deauthorize all, then authorize the active computers.

  • ON IOS8 UPDATE FOR IPHONE 5C, HOW DO YOU REMOVE RECENTS LIST FROM HOME SCREEN

    HOW DO YOU REMOVE RECENTS LIST FROM HOME SCREEN ON IOS8 UPDATE FOR IPHONE 5C

    SSettings/mail etc/show in app switcher turn that off

  • How Do You Populate A Spark List Control With An Array?

    Hello, all,
    Sorry to come accross so frustrated, but how in the name of God do you populate a Spark list control with the data in an array?  You used to be able to do this with the mx:List control, but the guys developing Flex just had to make things more difficult than they need to be!  I am more of a code purist and prefer doing things the way they have been done for decades, but apparently nothing can ever stay simple!
    I simply want to populate a list control with an array and this shouldn't be rocket science!  I found out that I must use a "collection" element, so I decided that an arrayCollection would be best.  However, after searching Adobe's documentation about arrayCollections, I am lost in a black hole of data binding, extra lines of code just to add a new element, the need to sort it, etc...!
    Here is my code:
    var pendingArray:ArrayCollection = new ArrayCollection();
    for ( var i:int = 0 ; i < queue.length ; i++ )
         var item:UserQueueItem = queue[i] as UserQueueItem ;
         if ( item.status == UserQueueItem.STATUS_PENDING )
         pendingArray.addItem({label:item.descriptor.displayName,descriptor:item.descriptor});
    Here is the relevant MXML:
    <s:VGroup>
         <s:List id="knockingList" width="110" height="100"/>              
    </s:VGroup>
    I'm not getting any errors, but the list is not populating.
    I have seen several examples where the arrayCollection is declared and populated in MXML:
            <mx:ArrayCollection id="myAC">
                <!-- Use an fx:Array tag to associate an id with the array. -->
                <fx:Array id="myArray">
                    <fx:Object label="MI" data="Lansing"/>
                    <fx:Object label="MO" data="Jefferson City"/>
                    <fx:Object label="MA" data="Boston"/>
                    etc...
               </fx:Array>
            </mx:ArrayCollection>
    That may be fine for an example, but I think this is a rare situation.  Most of the time I would image that the arrayCollection would be created and populated on the fly in ActionScript!  How can I do this?
    Thanks in advance for any help or advice anyone can give!
    Matt

    In your post it seemed like you were trying to take care of many considerations at once: optimization, design, architecture.  I would suggest you get something up and running and then worry about everything else.
    If I use data binding, then I will probably have to declare the  arrayCollection as a global variable and then I'll have to write 100 or  so extra lines of code to addItem(), removeItem(), sort(), etc...  It  just seems like too much overhead.
    I believe you may have some misconceptions about databinding in general.  You won't have to make it a global variable and you certainly won't need an extra 100 lines of code.  If you did this forum would be a very , very quiet place.
    I don't want to use data binding because the original array is refreshed  often and there is one function called by an event that re-declares the  arrayCollection each time, populates it with the array, and then sets  it as the list's dataprovider.
    That is the beauty of the ArrayCollection, it can handle the updates to its source Array. I don't know if you need to redeclare the ArrayCollection, resetting the source to the new Array allows everyone involved to keep their references so you don't have to worry about any "spooky" stuff going on.

  • How to create a dropdown list to list the values from two different tables?

    Hi,
    I have the following requirement:
    1. I have to create a dropdown list to display all the values from the second column of  a table.
    2. Another dropdown list to display all the values from the second column of another table.
    3. A text box should help me to add the selected values.
    How to get this done in a PDF? Please help.
    Regards,
    Latha

    Is this a LC form? Because Acrobat forms have no concept of tables, just
    individual fields...

  • How to fill the dropdown list in a input field

    Hi all,
    I have three input fields, Month, Material type and material.
    My requirement is to search material based on material type.  So if i select one material type from the dropdown list, corresponding material should be populate in the material dropdown.
    Pls suggest to this requirement i have
    Regards
    Jeswin

    Hi,
    Refer Below Blog Step By Step For fill data in dropdownlist Getting Data From SAP BI Systems.
    Visual Composer :Get drop down list values  from BI InfoObject master data
    The Below Link is the For getting data from SAP ECC Systems For Both Value Help And DropDown list.
    Visual Composer: Value Help Data Service
    Go Through Above Links
    Points Are Welcome
    tahnks
    SubbaRao Chinta

  • How do you populate location's metadata?

    I'm just looking after ideas or your solutions on how to populate Country, State and City metadata. We all know what those terms mean, but it's sometimes difficult to populate them... and I don like to have them as "Unknown". For example:
    I make one-day visit to some small place in Italy, about 30km outside nearest town, where the photo is actually taken on the hills nearby.
    So, all I have for sure is Country=Italy.
    I could enter State as Province (Italy has more than hundred of them), but that would require quite a lot research to findout which place belong to which province -especially if visiting some foreign country (think of Asian states provinces).
    OK, I'll leave all State/Province blank too (thus "Unknown).
    Now about City: as said, nearest is about 30km away from shooting location and I actually never been there. Does/would that city count in your usage?
    Should I leave City blank too? Well, I'll have a lot "unknown" places then. And IMO it doesn't make sense I write City="Bruno's farm" (should be used for Location tag though).
    How do you deal with these?
    Thanks for ideas,
    Bogdan

    I have a two part answer:
    1. Where I do have records of the location, even if it requires research, I fill out as much as I have. Country and State/Provence/Whatever are usually easy to reconstruct. I use the nearest city unless I'm in a Wildlife Refuge, Park, Reserve, et. Then I use that for City.
    I also create a keyword hierarchy which mirrors this, since LR won't automatically do this for me.
    2. Going forward I now shoot with a GPS on my D2X and will know exactly where I was. Perhaps there will be some easy lookup feature to populate the location fields from this one day. Until then, I'll just pop out to Google maps in LR and see where I was (if I can't remember).
    I know it sounds like I forget where I am a lot. The reality is that I go on multiweek shoots and cover a lot of ground before returning home. That was the motivator for the GPS, just tired of trying to remember which part of the jungle I was in for a given pic.

  • How do you get a list of events in a Calendar in Mountain Lion?

    I use a lot of calendars in Calendar to organize events. I am trying to consolidate these calendars because I have been having weird issues such as two calendars being linked to each other in a strange way. I want to move events into new calendars and delete the old calendars once I am certain they are empty. To do this, I want to be able to list all events in a given calendar. (Not page through month by month.) You used to be able to do this by searching for "." This no longer works.  How can I get a list of all events in a single calendar?

    If you are moving from an On My Mac Calendar to another On My Mac calendar or to an iCloud Calendar, you can use this AppleScript:
    tell application "Calendar"
              move events of calendar "Source" to calendar "Destination"
    end tell
    When I tried to move from an iCloud Calendar, Calendar got a server error.
    Further testing and it will move to an iCloud, but not iCloud to iCloud. Also, it doesn't move, although it looks that way. Once you close and open Calendar, it has the events in both locations.

  • Web Dynpro ABAP: How do I fill dropdown lists?

    Hi,
    I'm doing WD for ABAP and I'm trying to get contents into a dropdown list. I'm using DropDownListByKey. The contents come from a customizing table. I'm not sure where exactly I should add my coding: does it go into a supply function for my context attribute? Or in the method WDDOINIT? Basically, if you could point me towards some sample code, it would make me very happy!
    Thanks, Ira

    Hi,
    see http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/e4884180951809e10000000a155106/frameset.htm and the examples in the system in WDR_TEST_EVENTS and WDR_TEST_UI_ELEMENTS.
    Regards, Heidi

Maybe you are looking for