Populating a Drop Down List

I'm new to using Flash Builder 4, so we'll get that out of the way immediately!
My project uses a local database to retrieve and store information.  I've successfully created the database & can query it.  The problem I have is taking the results of that query and populating a simple dropdown list control.  All of the examples and tutorials I've seen, watched and read use either 1) local XML files for sample data or 2) a web data service to return items.  I've gone through those tutorials and trying to accomplish what I want is a piece of cake.  The "Data/Services" has no such 'connector' for local databases, so those 'techniques' don't apply...
I've tried numerous different solutions I've found and the result is I get all sorts of errors.  This is just my latest attempt and it throws an "Error #1034: Type Coercion failed: cannot convert flash.events::SQLEvent@437fe49 to mx.rpc.events.ResultEvent" at me.  I've tried to search for the different error numbers I get and frankly, the explainations and solutions seem totally out of whack.  I've tried to incorporate them with no success.
Using Flash Builder 4, it inserts the Spark components.  Lots of errors complain because I don't have an "mx:" component.  Changing "s:DropDownList" to "mx:DropDownList" per examples then starts throwing it's own set of unique errors in the process.
I have had code where it doesn't throw any errors, but the dropdown list just shows [object Object] for each item returned by the query.  This code throws the error I quote above:
private var getFacNum:SQLStatement = new SQLStatement();
[Bindable]
private var ddFacNum:ArrayCollection = new ArrayCollection();
private function populateFacilityNumber():void
getFacNum.sqlConnection = connection;
getFacNum.text = "SELECT id_facility, facilityNumber FROM facility ORDER BY facilityNumber";
getFacNum.addEventListener(SQLEvent.RESULT,ongetFacNum);
getFacNum.execute();
connectionStatus.text = "Executed Query"; 
// just show me a prompt that indicates I've gotten at least this far...
private function ongetFacNum(e:ResultEvent):void
ddFacNum = getFacNum.getResult().data as ArrayCollection;
<s:DropDownList includeIn="NewInspection"
dataProvider="{ddFacNum}"
fontFamily="Arial" fontSize="16"
id="ddFacilityNumber"
prompt="Select facility number...">
</s:DropDownList>
I'm coming from a .NET developing environment and it seems that these two types of systems are vastly different.  Any and all assistance, links, pointers, whatever, would be greatly appreciated.

http://www.adobe.com/devnet/flex/videotraining.html
http://www.adobe.com/devnet/flex/flex_net.html
I haven't used .NET for data access as yet but these 2 links should give you a start.
If you were talking Coldfusion or PHP, I might be able to help but fortunately I haven't been forced to used .NET for a few years. ;o)

Similar Messages

  • Help needed with populating a drop-down list from an Access Database

    Topic
    data drop-down list
    Jason Murthy - 11:39am Feb 14, 2005 Pacific
    Hello,
    I am trying to use the data drop-down list from the custom library. I enter the name of my data connection and the other 2 variables in quotes when they are initialized, just like the example says to, but it still doesn't work. Anyone have any thoughts?
    Thanks,
    Jason
    Reply To This Discussion | Back to Topic List | Bookmark | Change Subscription
    To start a NEW discussion click on the Back to Topic List link and select Add Topic.
    If you are in an archive forum please go up to the main topic list (archives are read only).
    Messages 11 messages. Displaying 10 through 11.
    First Previous Next Last Show All Messages
    Denzil White - 5:46am Jul 28, 05 PST (#10 of 11)
    Oh and before you say anything more I have also tried changing it from Javascript to the FormCalc, and no diff, maybe I am more stupid than I realised, heh,heh
    Post Reply | Bookmark
    Henk Pisuisse - 12:06am Aug 9, 05 PST (#11 of 11)
    I am having trouble (sleepless nights) with populating a drop-down list from an Access Database. The result is: I only get the first record from the data connection. So the connection works but I cannot go through the other records. Maybe there is an other way to do this.
    I am trying to selectively fill a form with data from an MS-access database.
    I hope someone can help me.
    [email protected]
    The Netherlands (small country in Europe)

    If you email the access DB and the form to [email protected], I will try to take a look at it for you.

  • Populateing a drop down list in a repeating sub form

    I have been using the scripts from the Purchase Order sample that work with the Country and States/Provinces drop down lists and have modified them to fit my needs. The scripts work great. However I have a drop down list that is in a repeating sub form and the only the drop down list in the first occurance of the sub form works. The others don't.
    I put this line of code in a field called drpOrderedByTeam.
    JobsScript.getJobsOther(xfa, xfa.resolveNode("form1.TimeSheetSF.DetailsSF[*].DetailsTable.DetailsRow.ItemNumber"));
    I thought I just needed to add an "[*]" to the name of the sub form and it would work with all occurances but it doesn't seem so and I'm not sure what else to do.

    Based on your explanations, I've attempted to re-create your form and I think I've got it working the way you'd like it to.
    There are some difficulties with using fields in table headers which are replicated on subsequent pages because while new instances of the header subform and the fields it contains are created, you don't have access to these instances using the header's Instance Manager (I think this is a bug but I'm not sure). This means that you can't iterate through the instances of the header in order to populate the task lists depending on the selection in the team list. One solution for this is to make all header fields Global (select each field and, in the Object palette's Binding tab, set the
    Default Binding property to
    Global). This means that all instances of these fields will share the same value. The effect is that when you change the value of a field on an instance of a header on any page, the change will be replicated on all instances on all pages. The catch, though, is when you use lists in the header. Making list fields global doesn't mean that their item lists are global -- which causes other headaches.
    In the end, because of the problems I've described, I had to resort to cheating a little but if you think about it, it's not really cheating. What the form does is whenever the team list value changes, it removes all instances of the DetailsSF rows. This has the effect of also removing all instances of the DetailTitlesSF headers accross the current page set (and removes all pages but the first one). Then 6 new instances of the DetailsSF row are generated and the DetailTitlesSF header is re-populated using the new selection in the team list. After that, if a new page gets generated because of the number of instances of the DetailsSF rows, the new instances of the task lists in the new instances of the DetailTitlesSF header will have the correct list of items based on the current value of the team list. In the end, even though I'm cheating by removing all instances of the DetailsSF row in order to reset the lists in the DetailTitlesSF header, it's not really cheating because if you change teams, then it should be assumed that all data entered doesn't apply anymore because the tasks change as well... Convinced?
    The best way to understand this is to check-out the sample form.
    Let me know if you have any questions.
    Stefan
    Adobe Systems

  • Populating 2nd drop down list based on the selection of the first using Access DB...

    I have a form that I would like to have the user select the first drop-down list as populated from a data source, but them have the subsequent selection choice dependent on the first. For instance, if they select "administration" for their division, the department numbers shown in the second box would only contain those with "Administration" listed as their division. I have all of this information in my Access table.
    I've seen this possible by storing all of the information in a script. i.e.- listing each division and department. The only problem is that we have over 300 departments and making any changes would be very tedious in an in-form script. Is there any way to have this automatically reference a table in Access?
    Thank you,
    Mike

    In the current version of the portal, it is not possible as you cannot do code-behind on postbacks. If you want more flexibility, you need to write your own front-end that uses the FIM Service webservices...
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

  • Purchase order sample - drop down list populating another drop down list

    hello, when i use this sample script, it works fine. but when i add additional arrays to it, it doesn't work at all. please let me know what i need to change in this script in order to add additional items into the drop down lists. here is the script that works (displays 3 options in first drop down list (blank, option, another option)):
    // This script object controls the interaction between the carrier and plan Drop-down lists.
    // The array contains the carriers and the corresponding plans.
    var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
    // For each carrier, add a 'new Array(number of plan +1)'.
    // Define the carrier and the corresponding plans.
    // The array syntax is arrayName[index][index].
    // The first index number represents the carrier,
    // the second index number is the actual data value.
    myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
    myCarriers[0][1] = " ";
    myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
    myCarriers[1][1] = "MC250"; // the rest are plans.
    myCarriers[1][2] = "MC2501";
    myCarriers[1][3] = "MC5002";
    myCarriers[1][4] = "MC5003";
    myCarriers[1][5] = "MC1000";
    myCarriers[1][6] = "MC2000";
    myCarriers[1][7] = "MCHC2300";
    myCarriers[1][8] = "MCHC3000";
    myCarriers[1][9] = "MC2500";
    myCarriers[1][10] = "MB";
    myCarriers[1][11] = "P500";
    myCarriers[1][12] = "MHH3000";
    myCarriers[1][13] = "MHH5000";
    myCarriers[2][0] = "BCCA"; // This is a new carrier, see how the first number is now [1].
    myCarriers[2][1] = "S Plan";
    myCarriers[2][2] = "BPlan";
    myCarriers[2][3] = "P40";
    myCarriers[2][4] = "P30";
    myCarriers[2][5] = "P35*";
    myCarriers[2][6] = "P45*";
    myCarriers[2][7] = "Ad25*";
    myCarriers[2][8] = "Pr20";
    myCarriers[2][9] = "Pr10";
    myCarriers[2][10] = "PH750*";
    myCarriers[2][11] = "PH500*";
    myCarriers[2][12] = "2400HD";
    myCarriers[2][13] = "3500HD";
    myCarriers[2][14] = "2000HD";
    myCarriers[2][15] = "LH1500";
    myCarriers[2][16] = "LH3000";
    // This function will populate the carrier Drop-down List.
    // This function is called from the initialize event of the carrier Drop-down List.
    function getCarriers(dropdownField)
    dropdownField.clearItems();
    for (var i=0; i < myCarriers.length; i++)
    dropdownField.addItem(myCarriers[i][0]);
    // This function will populate the plans Drop-down List for any event EXCEPT the change event.
    // This function is called by the initialize event of the plan Drop-down List.
    function getPlans(carrierField, dropdownField)
    dropdownField.clearItems(); // Clear the items of the Drop-down List.
    for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
    if(myCarriers[i][0] == carrierField.rawValue) // Check to see if they match.
    for (var j=1; j < myCarriers[i].length; j++) // When they match, add the plans to the Drop-down List.
    dropdownField.addItem(myCarriers[i][j]);
    dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
    // This function will populate the plans Drop-down List for the change event.
    // This function is called by the change event of the carrier Drop-down List.
    // The first parameter is simply a pointer to the xfa object model.
    function getPlansOther(myXfa, dropdownField)
    dropdownField.clearItems(); // Clear the items of the Drop-down list.
    for (var i=0; i < myCarriers.length; i++) // Look through all the carriers until we find the one that matches the carrier selected.
    if(myCarriers[i][0] == myXfa.event.newText) // Check to see if they match. Note: we have to use the event.newText in this case because
    { // the ch

    continued...
    change hasn't been committed yet.
    for (var j=1; j < myCarriers[i].length; j++) // When they match, add the states/provinces to the Drop-down List.
    dropdownField.addItem(myCarriers[i][j]);
    dropdownField.rawValue = myCarriers[i][1]; // Display the first item in the list.
    when i try to add 4 more arrays (add items to first drop down list and second drop down list), nothing displays in either drop down lists. please let me know the items that need to be changed - besides these items (i know i need to add arrays and add myCarriers[1][0],[2][0],[3][0] to [6][0] --- for 4 additional items in the first drop down):
    var myCarriers = new Array(new Array(2), new Array(14), new Array(17)); // Create a two-dimensional array.
    // For each carrier, add a 'new Array(number of plan +1)'.
    // Define the carrier and the corresponding plans.
    // The array syntax is arrayName[index][index].
    // The first index number represents the carrier,
    // the second index number is the actual data value.
    myCarriers[0][0] = " "; // The first items in the Drop-dowm Lists should be blank.
    myCarriers[0][1] = " ";
    myCarriers[1][0] = "ANERT"; // The first data value is the carrier name,
    myCarriers[1][1] = "MC250"; // the rest are plans.
    myCarriers[1][2] = "MC2501";
    myCarriers[1][3] = "MC5002";
    any help would be greatly appreciated. thank you!

  • Populating fields, drop down lists, etc... from external data

    Hi,
    I am trying to evolve my forms, and am interested in learning how to connect my forms to external data sources.  I assume using server solutions would work, but are complex and costly.  They are also likely beyond my scope of understanding.  What are the best practices for doing this?  Can it be done with a text file or spreadsheet?  I am really looking for a better way to create custom data in forms than to go into the script and change them manually.  Price is a good example.  I have some forms that generate a very basic quote for services.  When the price of part x changes I need to going into the from chance the script for those items, re-save it and hope I have not missed any items.  Evey time his happens it is a hassle.  Not to mention if more than one user needs it I have to make sure they are all using the right version (to be clear I am less worried about this part as it seems a complex task).
    Is there a better way of doing this?  What are the best practices for this?  What external sources can be used to hold the data.  I would be interested in any tutorials that may exist on the subject as well.
    Thanks in advance for any/all help. 
    Tom
    P.S. it is amazing what LCD can do, and that I really enjoy working in it, although I have little background in scripting.  Great product and resource!

    Thanks Paul,
    I have been able to solve the drop down list question, thanks to your help.
    I have another question that involves locking specific fields in a four page form which contains approximately 100 fields that need to be locked before the end user completes the remaining fields. How do I lock individual subforms so that the remaining fields remain open and editable?  The final version of the form, will have at least 200 fields in it that will also need to be locked in sections.
    I can lock all the fields using the lock all fields button, but have been unable to make it work for just part of the form.
    I've emailed the draft form.  It would be really helpful if I had one example of a locked subform on the form I'm struggling with.
    Thanks for your help.
    Nellie

  • Populating a drop down list of users using JSON from a REST call

    Hi guys,
    First post, have just started the mammoth project of turning us paperless.
    My first task has been to create a header template - this header to be used on any form we use. I got this done almost without issue, it seems the only complication is to attach the username to the document.
    Initially I tried to do this with a text field. I set this up with a calculation script to set this.rawValue = identity.username (also tried identity.name), however further reading taught me that that requires priviledged context (haven't figured out what that is or how to get it yet, but it seems like a 'no' for this method).
    My next step has been to attempt to let the user pick their username from a list. "Easy!" I thought, "I just set up a webscript last week to return a configurable list of user details. My web script (it runs off of Alfresco CMS, for the record) is accessed from an URL like https://docs.ourcompany.com:8443/alfresco/service/ourcompany/users?useGroup=[a user group]&filter=[a filter string] and returns JSON like this:
        "users" :
    "name" : "Chris O'Kelly", "userName" : "ChrisO"
    "filter" : "all",
    "error" : 0
    In the layout:ready script section for my dropdown I have used the following js
    function createRequest() {
      var result = null;
      if (window.XMLHttpRequest) {
        // FireFox, Safari, IE>6
        result = new XMLHttpRequest();
        if (typeof xmlhttp.overrideMimeType != 'undefined') {
          result.overrideMimeType('application/json');
      else if (window.ActiveXObject) {
        // IE <7
        alert("No available type");
        result = new ActiveXObject("Microsoft.XMLHTTP");
      else {
        alert("No available type");
        return;
      return result;
    var req = createRequest();
    req.onreadystatechange = function() {
      if (req.readyState != 4) return;
      if (req.status != 200) {
        alert("REST call failed");
        return;
      // Request successful, read the response
      var resp = req.responseText;
      this.addItem(resp.users.name, resp.users.userName);
    req.open("GET", "https://docs.ourcompany.com:8443/alfresco/service/ourcompany/users?useGroup=GROUP_EveryUser&filter=status", true);
    req.send();
    But when I preview the form I get nothing, no errors, no alerts, no filling of the dropdown. I've read a few conflicting forum posts on whether or not xmlHttpRequest works within liveCycle forms, so I suppose the guts of my question boils down to- does it?

    Hi!
    In the DropDownList set the labelField property to the name of the object property you want to appear.
    Ex:
    <s:DropDownList labelField="facilityNumber"
                    includeIn="NewInspection"
                    dataProvider="{ddFacNum}"
                    fontFamily="Arial" fontSize="16"
                    id="ddFacilityNumber"
                    prompt="Select facility number..."/>

  • Populate drop-down list from multiple text fields.

    Just to begin, I am brand new to this application and brand new to coding in general. Anyways, this is what I am trying to accomplish. I need to populate a drop-down list from multiple text fields. I am able to populate one item using this in the calculate event:
    TextField1.rawValue
    After I type text in TextField1 and hit enter, it displays the text in the drop-down list. I need to do this but with more than just one text field to populate more options for the drop-down list. I will also need to do something similar with populating a drop-down list from selections made in multiple other drop-down lists.
    Thanks for any help you can give me.

    Thank you for your suggestion Geo Kaiser. With that, I was able to populate my drop-down lists, but now when I select an option from the drop-down list, the selection dissapears. The selection will appear briefly in the box but then dissapears although my drop-down list options remain there. Here is the code I am using for my text field to drop-down list:
    DropDownList1.clearItems()
    DropDownList1.addItem(TextField1)
    DropDownList1.addItem(TextField2)
    And here is my code for my drop-down list to populate another drop-down list:
    DropDownList3.clearItems()
    DropDownList3.addItem(DropDownList1)
    DropDownList3.additem(DropDownList2)
    Thanks again for your help. By the way, I am using Adobe Designer 7.0.

  • Is it possible to show first item in a Drop down list

    Is it possible to automatically display the first item in a drop down list ?
    The reason I ask is  ... I am generating pre-filled PDF forms using XML data files.
    Whenever there is a certain type of data I am populating a drop down list for the user to review.
    Currently, the user must click on the drop down to see if data is there regardless of whether there is no data at all or many data lines of data..
    I would like to make it clear to the user whether or not there is any data - right awa.y
    I have considered creating a display item next (like a check box or a text field ) next to the drop down and setting it to cindicate if there is data, etc -
    but i thougth that I would ask if the drop down could simply be set to automatically display the first item in the list (this is the preferred functionality)
    If this is not possible I can always create a check box and set it if there is any data as an  indicator for the user ..
    Thanks

    You can do this way..
    Place the code in Inititalize event with Java Script
    if(DropDownList1.rawValue == null)
        DropDownList1.selectedIndex = 0;
    You need to check if the Dropdown has a value selected from the previous save.. If not then set the selected item to 0th index. (which is 1st one in the dropdown values)..
    Thanks
    Srini

  • Assigning Values to Drop-Down Lists

    I am populating a drop-down list with values of vendor names from my Oracle table. However, I'm assigning the vendor name as the value for each <option> record displayed in the drop-down list. The problem I'm having is that when I select a vendor name from the drop-down list and I view to see which value was selected, I only see a partial vendor name, rather than the full name. For example, If the vendor name that is selected is "Jacks Welding", when I retrieve that selection in my JSP page, the value only comes up as "Jacks" not "Jacks Welding". I want the option value to be the vendor name, not the vendor ID. How can I retrieve the full name from the drop-down list? Below is my code for populating the vendor names.
    <select name="vendor">
         <option></option>
    <%
    queryvendor = "Select Name from AJM.Vendor ORDER BY Name";
    Statement st = conn.createStatement();
         ResultSet rs = st.executeQuery(queryvendor);
         while (rs.next()) {
              out.println( "<option value=" + rs.getString("Name") + ">" + rs.getString("Name") + "</optioN>");
         st.close();
         rs.close();
    %>
    </select>

    Have a look at the HTML your code is producing. (Hint: your browser allows you to display the HTML source of a page.) You are producing this:
    <option value=Jacks Welding>Jacks Welding</optioN>
    This is sloppy HTML, but browsers will do their best with it. Try producing this instead:
    <option value="Jacks Welding">Jacks Welding</option>

  • Adobe LiveCycle Designer 8.1 Drop-Down List Problem

    I have an array of data.  I'm populating one drop-down list (Genus) with data and then trying to populate a second drop-down list (Species) based on the selection from the first drop-down list (Genus).<br /><br /><?xml version="1.0" encoding="UTF-8"?><br /><?xfa generator="AdobeLiveCycleDesigner_V8.0" APIVersion="2.5.6290.0"?><br /><xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2007-08-20T19:50:53Z" uuid="6f886dfc-03cb-474d-84ad-70c94bed1788"><br /><template xmlns="http://www.xfa.org/schema/xfa-template/2.5/"><br />   <subform allowMacro="1" layout="tb" locale="en_US" name="form1"><br />      <pageSet><br />         <pageArea id="Page1" name="Page1"><br />            <contentArea h="756pt" w="576pt" x="0.25in" y="0.25in"/><br />            <medium long="792pt" short="612pt" stock="default"/><br />            <?templateDesigner expand 1?></pageArea><br />         <?templateDesigner expand 1?></pageSet><br />      <subform h="756pt" w="576pt"><br />         <field h="8.6202mm" name="PrintButton1" relevant="-print" w="41.8956mm" x="158.7501mm" y="34.7904mm"><br />            <?templateDesigner isPrintObject true?><br />            <ui><br />               <button/><br />            </ui><br />            <font typeface="Myriad Pro"/><br />            <caption><br />               <value><br />                  <text>Print Form</text><br />               </value><br />               <para hAlign="center" vAlign="middle"/><br />               <font typeface="Myriad Pro"/><br />            </caption><br />            <border hand="right"><br />               <?templateDesigner StyleID apbx2?><br />               <edge stroke="raised"/><br />               <fill><br />                  <color value="212,208,200"/><br />               </fill><br />            </border><br />            <bind match="none"/><br />            <event activity="click"><br />               <script contentType="application/x-javascript">xfa.host.print(1, "0", (xfa.host.numPages -1).toString(), 0, 1, 0, 0, 0);</script><br />            </event><br />         </field><br />         <draw h="8.6202mm" name="StaticText1" w="128.9085mm" x="3.4391mm" y="0.3098mm"><br />            <ui><br />               <textEdit><br />               </textEdit><br />            </ui><br />            <value><br />               <text>CRP Request/Report Form for qPCR Analysis:</text><br />            </value><br />            <font size="14pt" typeface="Myriad Pro" weight="bold"/><br />            <margin bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm" topInset="0.5mm"/><br />            <traversal><br />               <traverse ref="DateTimeField1[0]"/><br />            </traversal><br />            <?renderCache.bounds 362576 21601 0 0 1417 1417 0 0?><br />            <?renderCache.textRun 42 CRP Request/Report Form for qPCR Analysis: 0 1417 11917 0 0 0 "Myriad Pro" 1 0 14000 ISO-8859-1?></draw><br />         <field h="7.7252mm" name="Req" w="77.6041mm" x="3.4391mm" y="8.9305mm"><br />            <ui><br />               <textEdit><br />                  <border><br />                     <?templateDesigner StyleID aped2?><br />                  </border><br />                  <margin/><br />               </textEdit><br />            </ui><br />            <font typeface="Myriad Pro"/><br />            <margin bottomInset="1mm" leftInset="1mm" rightInset="1mm" topInset="1mm"/><br />            <para vAlign="middle"/><br />            <caption reserve="26.19mm"><br />               <font baselineShift="0pt" typeface="Myriad Pro"/><br />               <para marginLeft="0pt" marginRight="0pt" spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" vAlign="middle"/><br />               <value><br />                  <text>Requestor</text><br />               </value><br />            </caption><br />            <border><br />               <edge presence="hidden"/><br />               <corner presence="hidden" thickness="0.1778mm"/><br />            </border><br />            <traversal><br />               <traverse ref="Lot[0]"/><br />            </traversal><br />         </field><br />         <draw h="8.1758mm" name="StaticText2" w="18.6252mm" x="3.4391mm" y="17.5504mm"><br />            <ui><br />               <textEdit><br />               </textEdit><br />            </ui><br />            <va

    var constColNum = 10;
    var InfoDB = new Array
    new Array( "Bacillus","Brucella","Burkholderia","Coxiella","Clostridium", "Erwinia","Francisella","Yersinia","Rickettsia","Other"),
    new Array( "anthracis","cereus","thuringensis","subtilis","globigii","lichenformis","other"),
    new Array( "melitensis","suis","ovis","canis","abortus","neotomae"),
    new Array( "mallei","pseudomallei"),
    new Array( "burnetti","other"),
    new Array( "botulinum"),
    new Array( "herbicola"),
    new Array( "tularensis","holartica"),
    new Array( "pestis","pseudo TB","other"),
    new Array( "prowazekii"),
    new Array( "other"),
    new Array( "DHP61.183","cereus grp","sodA","tarA","omp25","IS407A","IS1111A","Cbot","aroQ","tul4"),
    new Array( "3A","Rprow4","capB,pagA,tarA","cereus grp, tarA","cereus grp, tarA, F1cap, pesticin, YopD","designed assay"),
    new Array( "0.1754","0.1718","0.1742","0.2164","0.2170","0.2778","0.1565","0.1255","0.4762","0.4808" ),
    new Array( "0.4831","0.8197","0.1976","0.1923","you figure it out")
    function LoadDropMenu(obj, rowNum)
    for(i = 0; i < constColNum; i++)
    obj.addItem(InfoDB [rowNum][i], i + "");
    function LoadDropMenu2(objDropDown, nIndex)
    var arrayInfoDB = InfoDB[nIndex];
    objDropDown.rawValue = "";
    objDropDown.clearItems();
    for (var i = 0; i < constColNum; i++)
    objDropDown.addItem(arrayInfoDB[i], i + "");
    //objDropDown.addItem(arrayInfoDB[i]);

  • Populating the "Collections" drop down list in FEP reports

    When an FEP Antimalware report (e.g., the Antimalware Activity Report) opens in Report Manager or the FEP console, I see a drop-down list labeled
    Collection: from which I need to make a selection before the report can run.  But on our site, this drop-down list is not populated, even though ConfigMgr shows that collections do exist on our site.
    The report is running under credentials that should have full access to everything in the relevant databases, so I'm puzzled.  Any suggestions?

    This old post and there are a lot of improvements in FEP's successor which is System Center Endpoint Protection (SCEP), you may try use SCEP and try reproduce the problem and if problem persist let us know.
    Sometimes, it is issue due to SQL database , so check SQL and make sure it is working correctly and is fully updated.

  • Populating Drop-down List in Interactive Forms for Java

    Hi,all
    I need to populate a drop-down list in Interactive Form.
    I tried to do it by using Dynamic Properties of the drop-down
    list,but didn't give nothing.At the same time I have successfully
    populated a simple drop-down list(on webdynpro view),which I
    replaced near my InteractiveForm.
    What may be the problem?
    Regards,
    Michael

    Use the DDL from the Web Dynpro pallette. Bind the same/ similar attribute of the DDL you used in the web Dynpro view in the interactive form also... this should work..
    Thanks and Regards,
    Anto.

  • Drop Down List not getting populated

    Dear All,
    I have developed a form in SFP which containes a drop down list.The drop down list is to be populated by an internal table field.
    Whenever I am executing the form i can see only the first item in the drop down listand nothing else.
    While debugging i could see the almost 15 entries in the internal table.
    I have mapped a field of this internal table to the drop down list.I am unable to figure out the problem....do let me know which type of drop down list should i use for this scenario....I even tried with java script...but nothing works for me...do let me know??
    Waiting for t
    Regards,
    Geet

    hi,
    i guess you have bound the field but not the list elements of the field.
    the content of the field (as result of the selection from the drop down list box) can be bound to a variable.
    But if you want to display your internal table as entries in your drop down list box you have to do some dynamic data binding of the list elements.
    to be able to do this, you first have to activate dynamic data binding in general. Use the way i proposed (--> extras from the toolbar!, options, data binding, dynamic). then the word "list elements" in the object palette of your dropdown list box will be green and you will be able to do some dynami data binding!
    i recommend you this one:
    --> http://www.adobe.com/devnet/livecycle/articles/strategies_creating_forms_lc_designer8/strategies_for_creating_form_designs_using_designer8.pdf
    br
    norbert

  • Error while populating drop down list with values from a database

    Hi all,
    I have a JSP page with a drop down list that is to be populated with values from a database.
    This is the code in my JSP file:
         <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) { %>
                       <option value="<%=iterator.next().intValue()%>"> <%=iterator.next().intValue()%> </option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>   The DataManager.java class simply forwards this to its respective Peer class, which has the code shown below:
          package seatplanner.model;
        import java.sql.Connection;
        import java.sql.ResultSet;
        import java.sql.SQLException;
        import java.sql.Statement;
        import java.util.ArrayList;
        /* This class handles all floor operations */
         public class FloorPeer
         /* This method returns all the floor numbers */
         public static ArrayList<Integer> getAllFloorNumbers(DataManager dataManager) {
            ArrayList<Integer> floornumbers = new ArrayList<Integer>();
            Connection connection = dataManager.getConnection();
            if (connection != null) {
              try {
                Statement s = connection.createStatement();
                String sql = "select ID from floor order by ID asc";
                try {
                  ResultSet rs = s.executeQuery(sql);
                  try {
                    while (rs.next()) {
                      floornumbers.add(rs.getInt(1));
                  finally { rs.close(); }
                finally {s.close(); }
              catch (SQLException e) {
                System.out.println("Could not get floor numbers: " + e.getMessage());
              finally {
                dataManager.putConnection(connection);
            return floornumbers;
         }  The classes compile properly, but when I load this page up in Tomcat it just freezes and does not load the form. I tested the DB connection and it works fine.
    What am I doing wrong in the JSP code?
    Thanks for the help in advance.
    UPDATE: I commented out the form, and added <%=floornumbers.size()%> right above the commented code to check if the ArrayList is indeed getting populated with the values from the database (the values are of type integer in the database). The page still freezes like before. I'm puzzled now :confused: .

    Wrong usage of Iterator.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers();
                Iterator<Integer> iterator = floornumbers.iterator(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% while (iterator.hasNext()) {
                                    Integer inte = iterator.next();
                            %>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <% } %>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>or make use of enhanced loop as you are already using J2SE 5.0+ for avoiding confusions.
    <!-- Form for picking the floor -->
             <!-- Get the available floors -->
             <% ArrayList<Integer> floornumbers = dataManager.getAllFloorNumbers(); %>
             <!-- Create the form for users to select the floor -->
             <form id="floorselectionform">
                  <input type="hidden" name="action" value="floorselected"/> <!-- Guides the servlet to redirect to the appropriate page -->
                  Select floor | <select name="floorselector" id="floorselector">
                       <% for(Integer inte:floornumbers) {%>
                       <option value="<%=inte.intValue()%>"><%=inte.intValue()%></option>
                       <%}%>
                  </select>
                  <input type="submit" value="Go!"/>
             </form>and a lot better thing would be making usage of basic Taglib provided with JSTL spec or struts spec which make life easier and simple.
    something like usage of <c:forEach/> or <logic:iterate/> would be lot better without writing a single scriptlet code.
    Hope that might help :)
    REGARDS,
    RaHuL

Maybe you are looking for