Creation of dynamic dropdown

Hi,
   I am trying to create a dropdown at runtime.Following is the context structure i am using
Wdcontext
          nodeProperty     
                   nodeAllowedValues - singleton node
                              Value - attribute
I am binding the "value" attribute of the node allowed values to the dropdown.I am filling the context attribute value at runtime.But the dropdown values are not filled in the UI.
The following is the code snippet.
Iterator propIt = wdContext.nodeProperty().iterateElements();
           while(propIt.hasNext())
                element=  (IPropertyElement)propIt.next();
                                              IWDTransparentContainer transContainer = (IWDTransparentContainer) view.getElement("TransparentContainer");
       IWDToolBarDropDownByIndex ddByIndex1 = (IWDToolBarDropDownByIndex) view
          .createElement(IWDToolBarDropDownByIndex.class,
                     "DropDown" + UUID );
ddByIndex1.setEnabled(true);
ddByIndex1.bindTexts(element.nodeAllowedValues().getNodeInfo().getAttribute("Value"));
transContainer.addChild(ddByIndex1);
Please Help.
Regards
Vasudha

First, why do you need to create the drop-down list(s) by code?
- The code you have posted obviously creates as many drop-down lists as there are elements in the node "nodeProperties". Is that what you want?
- You are creating ToolBar* drop-down lists. Why?
- What is UUID?
Armin

Similar Messages

  • Implementing a dynamic dropdown list

    Hi All,
    I am implementing an Adaptive RFC model that uses two custom RFC's. First RFC returns a table that has list of countries and the second RFC returns a table that lists the states of a particular country.
    Now using these two RFC's how do I implement a dynamic dropdown...i mean the first dropdown should show the list of countries and the second dropdown should show the list of states depending on the country selected.
    Thanks,
    Tom

    Hi Tom,
    Please try this,
    IWDNodeInfo multiplenode = multipleinfo.addChild("MultiNode" , null, true, false, true, true, false, true, null, null, null);
    multiplenode.addAttribute("roles", "ddic:com.sap.dictionary.string");
    Assign values for Dropdown
    IWDNode node1 = wdContext.nodeNodeA().getChildNode("MultiNode", IWDNode.NO_SELECTION);
    IWDNodeElement elem1;
    for(int s=0;s<5;s++){
    elem1 = node1.createElement();
    elem1.setAttributeValue("roles","Value"+s);
    node1.addElement(elem1);
    Inside Domodifyview create IWDDropDownByIndex UI Element and Bind it.
    IWDDropDownByIndex dropDownList = (IWDDropDownByIndex)view.createElement(IWDDropDownByIndex.class, "drop");
    IWDAttributeInfo info = wdContext.getNodeInfo().getChild("NodeA").getChild("MultiNode").getAttribute("roles");
    dropDownList.bindTexts(info);
    dropDownList.setWidth("100");
    Regards,
    Ramganesan K.

  • Search issue with dynamic dropdown array - PHP

    I'm currently trying to set up a search with a couple of
    dynamic dropdowns, basically to search for cars - so the parent
    list is car make, and the child is car model.
    I've gotten as far as a page with the dynamic array working,
    but not the search :
    dynamic array
    working
    (Ignore the cars and vans radio buttons)
    For testing there's an Audi A3 and and Audi A6, but this
    search doesn't work.
    The select code looks like :
    <select name="Model">
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    </select>
    And the array code looks like :
    <?php
    if ($row_rsModels) {
    echo "<SC" . "RIPT>\n";
    echo "var WAJA = new Array();\n";
    $oldmainid = 0;
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid == $newmainid) {
    $oldmainid = "";
    $n = 0;
    while ($row_rsModels) {
    if ($oldmainid != $newmainid) {
    echo "WAJA[".$n."] = new Array();\n";
    echo "WAJA[".$n."][0] = '".WA_DD_Replace($newmainid)."';\n";
    $m = 1;
    echo "WAJA[".$n."][".$m."] = new Array();\n";
    echo "WAJA[".$n."][".$m."][0] =
    "."'".WA_DD_Replace($row_rsModels["ModelID"])."'".";\n";
    echo "WAJA[".$n."][".$m."][1] =
    "."'".WA_DD_Replace($row_rsModels["Model"])."'".";\n";
    $m++;
    if ($oldmainid == 0) {
    $oldmainid = $newmainid;
    $oldmainid = $newmainid;
    $row_rsModels = mysql_fetch_assoc($rsModels);
    if ($row_rsModels) {
    $newmainid = $row_rsModels["Make"];
    if ($oldmainid != $newmainid) {
    $n++;
    echo "var rsModels_WAJA = WAJA;\n";
    echo "WAJA = null;\n";
    echo "</SC" . "RIPT>\n";
    function WA_DD_Replace($startStr) {
    $startStr = str_replace("'", "|WA|", $startStr);
    $startStr = str_replace("\\", "\\\\", $startStr);
    $startStr = preg_replace("/[\r\n]{1,}/", " ", $startStr);
    return $startStr;
    ?>
    ..to try and find the root of the problem, I've gotten as far
    as a similar page, without the dynamic
    array, with the child dropdown populated dynaically from the
    recordset :
    search working
    This seems to work exactly as advertised - all the car models
    are listed from the recordset, and if
    you search for Audi and A3, then it gets returned correctly.
    The select code here looks like :
    <select name="Model" id="Model">
    <option value="">Select a Model</option>
    <?php
    do {
    ?>
    <option value="<?php echo
    $row_rsModels['Model']?>"><?php echo
    $row_rsModels['Model']?
    ></option>
    <?php
    } while ($row_rsModels = mysql_fetch_assoc($rsModels));
    $rows = mysql_num_rows($rsModels);
    if($rows > 0) {
    mysql_data_seek($rsModels, 0);
    $row_rsModels = mysql_fetch_assoc($rsModels);
    ?>
    </select>
    ..so I guess the search is set up OK, but the issue is with
    how to pass the model from the select code generated by the dynamic
    array correctly....
    Its presumably because the option value is empty :
    <option value="" <?php if (!(strcmp("",
    $row_rsModels['Model']))) {echo "selected=\"selected\"";}
    ?>>Select a Model</option>
    So I've been trying various possibilities with no joy, such
    as :
    <?php if (!(strcmp("", $row_rsModels['Model']))) {echo
    "selected=\"selected\"";} ?>
    but without success.
    Even then, I'd have though if the value was empty, "", then
    it would return all results, rather than no results....?
    hope that makes some sense, and someone can shed some
    light...
    Cheers.

    Thomas Jung wrote:>
    > >
    Chris Paine wrote:
    > > That's a shame!
    > >
    > > Does this mean that using a drop down by index in an ALV is limited to having the same dropdown in every row of the table (it would certainly seem that this is the case).
    > >
    > > Cheers,
    > >
    > > Chris
    >
    > I would assume so as I can't think of a way around the subnode limitation. The system will actually allow you to have a subnode and everything works fine until you sort the ALV - then you get a short dump.
    >
    > I suppose you would have to fall back to using a regular table in this case.
    But how come the class documentation says its possible.
    Functionality
    Using class CL_SALV_WD_UIE_DROPDOWN_BY_IDX, you make all the settings for the UI element index-based dropdown list box, from which the user can select from a range of values.
    *You use the index-based dropdown list box if the dropdown list boxes in each cell of the column are to contain different entries.*
    You use the key-based dropdown list box if the dropdown list boxes in each cell of the column are to contain the same entries.
    To specify the entries in the dropdown list boxes, the context of your application requires an attribute for which the data type satisfies the following requirements:
    The attribute is a table
    The structure of this table contains at least one KEY column and a VALUE column.
    Note
    We recommend that you use the type WDY_KEY_VALUE_TABLE here.

  • Need Value and labed different for a dynamic Dropdown in an ADF page

    Hi,
    We have an ADF page with a drop down.
    This is populated dynamically.
    We have created using the below code.
    Issue: what we need is that each value the Label set should be different.
    Code : presently hard coded
    In the Java file for the page we had the following code:
    ===========================================================
    String haircolor;
    SelectItem[] haircolorSelectItems;
    ArrayList haircolorlist = new ArrayList();
    public PatientAdvSearch() {
    haircolorlist.add(new SelectItem("Black"));
    haircolorlist.add(new SelectItem("Blonde"));
    haircolorlist.add(new SelectItem("Red"));
    haircolorlist.add(new SelectItem("Others"));
    haircolorlist.add(new SelectItem("Grey"));
    SelectItem[] haircolors = (SelectItem[]) haircolorlist.toArray(new SelectItem[0]);
    haircolorSelectItems = haircolors;
    public void setHaircolor(String haircolor) { this.haircolor = haircolor; }
    public String gethaircolor() { return haircolor; }
    public SelectItem[] getHaircolorSelectItems() {
    return haircolorSelectItems;
    ===========================================================
    And the JSPX will have the following code.
    <af:selectOneChoice binding="#{backing_PatientAdvSearch.selectOneChoicerace11}"
    id="selectOneChoicerace11"
    unselectedLabel="&lt;Select>">
    <f:selectItems value="#{backing_PatientAdvSearch.haircolorSelectItems}" />
    </af:selectOneChoice>
    ===========================================================
    This populates both Lable and Value for the Select Item with one value.
    We need two different value.
    How do we go ahead with that.
    Thanks

    Yes.. actually i am also facing the same prob...
    i need value and label to be different for dynamic dropdown.
    Please help in case any one has faced the same issue.

  • Dynamic dropdown in Acrobat?

    Small business owner. Trying to create dynamic dropdowns in pdf that I open and fill with an ipad for on-site estimates. I know nothing about java, but I need a dropdown box that repopulates after a different one has a value selected: ie, Box one is material for a deck and box two is a color selection.  How can I make this happen? I found this link which is virtually identical to what I want minus the label changes. (http://jsfiddle.net/e9XvP/) How can I incorporate this into a PDF?

    Small business owner. Trying to create dynamic dropdowns in pdf that I open and fill with an ipad for on-site estimates. I know nothing about java, but I need a dropdown box that repopulates after a different one has a value selected: ie, Box one is material for a deck and box two is a color selection.  How can I make this happen? I found this link which is virtually identical to what I want minus the label changes. (http://jsfiddle.net/e9XvP/) How can I incorporate this into a PDF?

  • Print form with dynamic dropdown

    Dear all,
    I have a form (xdp) with dynamic dropdown inside. (i.e. The value list is empty in design time)
    And I have a problem that the print out (via the sendToPrinter service) will have the data value (e.g. EN) instead of the display value (e.g. English) for all the dynamic dropdown.
    Would like to know if there are any solution beside mapping all the values from data value to display value before print?
    Thanks in advance
    Regards
    Bill

    I'm also seeking the better solution instead of
    a) creating 2 field - one for capture data, one for printing (and it doesn't work using LC ES server component)
    b) creating 2 templates - one for capture data, one for printing (maintenance overhead)
    Ideally & logically, this should be achieve by using one field since it has already come with the presence & relevant attribute.
    Anyway, the main problem, why dropdown data is printed instead of display value?
    The user doesn't even know what's the technical data behind the dropdown screen value he/she selected.
    From user point of view, nobody wants to see the technical data printed instead of the display value...

  • Murray Please - Re: dynamic dropdown list DWMX

    Hello Murray,
    The dynamic dropdown list works fine now!
    I have now a little other problem, the ORDER BY for my
    dropdown list.
    I selected "ASC" but he shows me from Z -->>A and a
    want from A-->>Z
    Can you explain this? My code ...
    Thanks in advanced,
    www.SamDesing.be
    <%
    Dim groepenrecordset
    Dim groepenrecordset_numRows
    Set groepenrecordset = Server.CreateObject("ADODB.Recordset")
    groepenrecordset.ActiveConnection = MM_con_dbwaterloo_STRING
    groepenrecordset.Source = "SELECT * FROM tbl_hoofdgroep ORDER
    BY
    hoofdgroep_fr ASC"
    groepenrecordset.CursorType = 0
    groepenrecordset.CursorLocation = 2
    groepenrecordset.LockType = 1
    groepenrecordset.Open()
    groepenrecordset_numRows = 0
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Untitled Document</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_jumpMenu(targ,selObj,restore){ //v3.0
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    if (restore) selObj.selectedIndex=0;
    //-->
    </script>
    </head>
    <body>
    <form action="resultdropdown.asp" method="post"
    name="dropdown"
    id="dropdown">
    <p>Select category</p>
    <select name="hoofdgroep" id="hoofdgroep"
    onChange="MM_jumpMenu('parent',this,1)">
    <%
    While (NOT groepenrecordset.EOF)
    %>
    <option
    value="resultdropdown.asp?ID_hoofdgroep=<%=(groepenrecordset.Fields.Item("ID_hoofdgroep") .Value)%>"
    <%If (Not
    isNull((groepenrecordset.Fields.Item("ID_hoofdgroep").Value)))
    Then If
    (CStr(groepenrecordset.Fields.Item("ID_hoofdgroep").Value) =
    CStr((groepenrecordset.Fields.Item("ID_hoofdgroep").Value)))
    Then
    Response.Write("SELECTED") : Response.Write("")%>
    ><%=(groepenrecordset.Fields.Item("hoofdgroep_fr").Value)%></option>
    <%
    groepenrecordset.MoveNext()
    Wend
    If (groepenrecordset.CursorType > 0) Then
    groepenrecordset.MoveFirst
    Else
    groepenrecordset.Requery
    End If
    %>
    </select>
    </p>
    </form>
    </body>
    </html>
    <%
    groepenrecordset.Close()
    Set groepenrecordset = Nothing
    %>
    "Murray *ACE*" <[email protected]> a
    �crit dans le message de
    news: [email protected]...
    You're welcome.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Sam" <[email protected]> wrote in message
    news:[email protected]...
    > Thank you Murray
    >
    > "Murray *ACE*" <[email protected]> a
    �crit dans le message
    > de news: [email protected]...
    >> You could use either, but with a jump menu, all you
    would have to do is
    >> to make sure that the category is carried to the
    results page as a URL
    >> parameter.
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "Sam" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hello friends,
    >>>
    >>> I know that this is possible, but I can't find
    the solution!
    >>>
    >>> I use ASP VB
    >>>
    >>> I have a dynamic dropdown list from a table
    "categories" (access), when
    >>> I select a category I want to display the
    results from that category on
    >>> the result page.
    >>>
    >>> Do I have to use a dropdown or jump menu?
    >>>
    >>> Somebody can help me or give me a good step by
    step tutorial
    >>>
    >>> Thanks in advance,
    >>>
    >>> www.SamDesign.be

    Sorry, Sam, I have no idea.....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Sam" <[email protected]> wrote in message
    news:[email protected]...
    >I found it, but the last category is always selected. Is
    it possible to
    >have always the first selected with the A and not the Z?
    > Thanks,
    >
    > "Murray *ACE*" <[email protected]> a
    �crit dans le message
    > de news: [email protected]...
    >> Try DESC....
    >>
    >> --
    >> Murray --- ICQ 71997575
    >> Adobe Community Expert
    >> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >> ==================
    >>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >> ==================
    >>
    >>
    >> "Sam" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Hello Murray,
    >>> The dynamic dropdown list works fine now!
    >>> I have now a little other problem, the ORDER BY
    for my dropdown list.
    >>> I selected "ASC" but he shows me from Z
    -->>A and a want from A-->>Z
    >>> Can you explain this? My code ...
    >>> Thanks in advanced,
    >>> www.SamDesing.be
    >>> <%
    >>> Dim groepenrecordset
    >>> Dim groepenrecordset_numRows
    >>>
    >>> Set groepenrecordset =
    Server.CreateObject("ADODB.Recordset")
    >>> groepenrecordset.ActiveConnection =
    MM_con_dbwaterloo_STRING
    >>> groepenrecordset.Source = "SELECT * FROM
    tbl_hoofdgroep ORDER BY
    >>> hoofdgroep_fr ASC"
    >>> groepenrecordset.CursorType = 0
    >>> groepenrecordset.CursorLocation = 2
    >>> groepenrecordset.LockType = 1
    >>> groepenrecordset.Open()
    >>>
    >>> groepenrecordset_numRows = 0
    >>> %>
    >>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN"
    >>> "
    http://www.w3.org/TR/html4/loose.dtd">
    >>> <html>
    >>> <head>
    >>> <meta http-equiv="Content-Type"
    content="text/html; charset=iso-8859-1">
    >>> <title>Untitled Document</title>
    >>> <script language="JavaScript"
    type="text/JavaScript">
    >>> <!--
    >>> function MM_jumpMenu(targ,selObj,restore){
    //v3.0
    >>>
    >>>
    eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
    >>> if (restore) selObj.selectedIndex=0;
    >>> }
    >>> //-->
    >>> </script>
    >>> </head>
    >>>
    >>> <body>
    >>> <form action="resultdropdown.asp"
    method="post" name="dropdown"
    >>> id="dropdown">
    >>> <p>Select category</p>
    >>> <select name="hoofdgroep" id="hoofdgroep"
    >>> onChange="MM_jumpMenu('parent',this,1)">
    >>> <%
    >>> While (NOT groepenrecordset.EOF)
    >>> %>
    >>> <option
    >>>
    value="resultdropdown.asp?ID_hoofdgroep=<%=(groepenrecordset.Fields.Item("ID_hoofdgroep") .Value)%>"
    >>> <%If (Not
    isNull((groepenrecordset.Fields.Item("ID_hoofdgroep").Value)))
    >>> Then If
    (CStr(groepenrecordset.Fields.Item("ID_hoofdgroep").Value) =
    >>>
    CStr((groepenrecordset.Fields.Item("ID_hoofdgroep").Value))) Then
    >>> Response.Write("SELECTED") :
    Response.Write("")%>
    >>>
    ><%=(groepenrecordset.Fields.Item("hoofdgroep_fr").Value)%></option>
    >>> <%
    >>> groepenrecordset.MoveNext()
    >>> Wend
    >>> If (groepenrecordset.CursorType > 0) Then
    >>> groepenrecordset.MoveFirst
    >>> Else
    >>> groepenrecordset.Requery
    >>> End If
    >>> %>
    >>> </select>
    >>> </p>
    >>> </form>
    >>> </body>
    >>> </html>
    >>> <%
    >>> groepenrecordset.Close()
    >>> Set groepenrecordset = Nothing
    >>> %>
    >>>
    >>> "Murray *ACE*"
    <[email protected]> a �crit dans le
    message
    >>> de news: [email protected]...
    >>> You're welcome.
    >>> --
    >>> Murray --- ICQ 71997575
    >>> Adobe Community Expert
    >>> (If you *MUST* email me, don't LAUGH when you do
    so!)
    >>> ==================
    >>>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >>> ==================
    >>>
    >>>
    >>> "Sam" <[email protected]> wrote in message
    >>> news:[email protected]...
    >>>> Thank you Murray
    >>>>
    >>>> "Murray *ACE*"
    <[email protected]> a �crit dans le
    >>>> message
    >>>> de news:
    [email protected]...
    >>>>> You could use either, but with a jump
    menu, all you would have to do
    >>>>> is
    >>>>> to make sure that the category is
    carried to the results page as a URL
    >>>>> parameter.
    >>>>>
    >>>>> --
    >>>>> Murray --- ICQ 71997575
    >>>>> Adobe Community Expert
    >>>>> (If you *MUST* email me, don't LAUGH
    when you do so!)
    >>>>> ==================
    >>>>>
    http://www.dreamweavermx-templates.com
    - Template Triage!
    >>>>>
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    >>>>>
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    >>>>>
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    >>>>> ==================
    >>>>>
    >>>>>
    >>>>> "Sam" <[email protected]> wrote in
    message
    >>>>>
    news:[email protected]...
    >>>>>> Hello friends,
    >>>>>>
    >>>>>> I know that this is possible, but I
    can't find the solution!
    >>>>>>
    >>>>>> I use ASP VB
    >>>>>>
    >>>>>> I have a dynamic dropdown list from
    a table "categories" (access),
    >>>>>> when
    >>>>>> I select a category I want to
    display the results from that category
    >>>>>> on
    >>>>>> the result page.
    >>>>>>
    >>>>>> Do I have to use a dropdown or jump
    menu?
    >>>>>>
    >>>>>> Somebody can help me or give me a
    good step by step tutorial
    >>>>>>
    >>>>>> Thanks in advance,
    >>>>>>
    >>>>>> www.SamDesign.be
    >>>
    >>>
    >>>
    >>
    >>
    >
    >

  • Mail values from dynamic dropdown

    Hi all,
    need your help to solve a problem.
    With LCD, I create a form with a dropdown listbox and a send button.
    If I maintain the values directly in LCD, everything works fine. The mail contains an XML with the chosen value.
    I've also find out, how to read the value dynamically from an XML.
    But when I do both, the XML contains the entire list instead of the selected value.
    Does anybody have a solution?
    Thanks and regards
    Martin

    Hi
    This should provide you the clue.
    Eg;
    *// Call the function module to send mail notification
          CALL FUNCTION 'ZHR_EMAIL_SEND_NOTIFCATION' IN BACKGROUND TASK AS SEPARATE UNIT
            EXPORTING
              im_pernr = ipspar-pernr
              im_massn = ipspar-massn
              im_massg = ipspar-massg
              im_begda = ipspar-begda
              im_endda = ipspar-endda.
    In this example, the preparation and sending the mail is done in the FM which is called in SEPERATE UNIT (different logical unit of work), so that, dynamic actions and mail sending are seperated and work in different space.
    Regards
    Raj

  • Dynamic Dropdown Field is blank

    I am using LiveCycle Designer 8.05<br /><br />And I am trying to create a dropdown form populated dynamically I guess from an .xml file.(Unless there is a better method)<br /><br />Basically I need to be able to have people update the contents of dropdown field but they wont have access to do it directly in designer<br />So I want them just to be able to update the .xml data.<br /><br />So I had this for the .xml<br /><br />___CODE___<br /><br /><?xml version = "1.0" encoding = "UTF-8"?><br /><br /><vehicles<br />    xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"<br />    xsi:noNamespaceSchemaLocation = "rank.xsd"<br />   ><br />       <nickname>E1</nickname><br />       <nickname>E2</nickname><br />       <nickname>E3</nickname><br /></vehicles><br /><br />___END_CODE___<br /><br />This is the .xsd schema<br /><br />___CODE___<br /><br /><?xml version = "1.0" encoding = "UTF-8"?><br /><br /><xsd:schema<br />   xmlns:xsd = "http://www.w3.org/2001/XMLSchema"<br />   ><br />    <xsd:element name = "vehicles"><br />     <xsd:complexType><br />      <xsd:sequence><br />       <xsd:element name = "nickname" <br />                    type = "xsd:string"<br />                    maxOccurs = "unbounded"/><br />      </xsd:sequence><br />     </xsd:complexType><br />    </xsd:element><br /></xsd:schema><br /><br />___END_CODE___<br /><br />I have Show Dynamic Properties On<br /><br />I add a dropdown box<br />I go to the binding tab<br />Click Default Binding<br />Select XML Schema<br />Select the.xsd  file from above<br />Click Embed<br />Click Finish<br /><br />Click specify item values<br />In the dynamic properties it says<br />Binding:<br />Items $record.nickname[*]<br />Item Text  the only option is a dollar sign<br />Item Value  the only option is  adollar sign<br /><br />I click OK<br /><br />Save it as a dynamic xml form <br />Open it and the dropdown is blank.<br /><br />I feel like I have tried a thousand different variations but nothing works<br />I either end up with a blank dropdown or the dropdown gets converted to a text field and it is blank.<br /><br />Could anyone shed some light on my problem?<br />Thanks

    Hi guys,
    I don't think, that it is possible to change the values of the dropdown by changing only the xml-file.
    I found another solution:
    1. open the form in Acrobat Pro
    2. select in the menu bar Form->Manage Form Data->Import Data
    3. choose your current xml-file
    4. save the form
    Now the values are available.
    To change the values, you have to repeat these 4 steps with a new xml-file.
    regards
    Martin

  • Autopopulate Dynamic Dropdown Field LC Designer

    I am trying to autopopulate dynamically created dropdown fields within another section of a form.
    Here is what I am trying to do:
    I have a report (home inspection) that is also an estimate for repairs.  I have several section of the report that have a button to add additional items (e.g. Kitchen, Living Room, ect).  The button dynamically adds new items for each area (e.g. Kitchen, Living Room, ect). Code is below, what I want to do is have all of the dynamically created items appear in the estimate section of the report but am not able to figure out the best way to do this.  Basically, all of the items that appear in the report also need to be in the estimate and I need to figure out a way to have the items duplicated from the report to the estimate.  Any help would be greatly appreciated.  Thank you
    <subform name="GoExterior" w="203.2mm" layout="tb">
    <draw name="GoExteriorTextHead" w="64.834mm" h="7.62mm">
    <ui>
    <textEdit/>
    </ui>
    <value>
    <text>General Observations - Exterior</text>
    </value>
    <font size="14pt" typeface="Myriad Pro" baselineShift="0pt"/>
    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
    <para spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" marginLeft="0pt" marginRight="0pt"/>
    </draw>
    <subform w="203.2mm" name="ItemsSubFormCrawlSpace" layout="tb">
    <draw name="Text3" w="29.2864mm" h="5.2331mm">
    <ui>
    <textEdit/>
    </ui>
    <value>
    <text>Crawl Space</text>
    </value>
    <font size="12pt" typeface="Myriad Pro" baselineShift="0pt" weight="bold" posture="italic" underline="1"/>
    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
    <para spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" marginLeft="0pt" marginRight="0pt"/>
    </draw>
    <subform name="DropdownGOCrawl" w="203.2mm" layout="tb">
    <occur max="-1"/>
    <subform w="203.2mm" name="DDCrawl">
    <keep intact="none"/>
    <field name="DropDownCrawl" w="171.45mm" h="9mm">
    <ui>
    <choiceList textEntry="1">
    <border presence="hidden"/>
    <margin/>
    </choiceList>
    </ui>
    <font typeface="Myriad Pro" weight="bold" size="11pt"/>
    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
    <para vAlign="middle"/>
    <caption reserve="25mm">
    <para vAlign="middle"/>
    <value>
    <text>Item:</text>
    </value>
    </caption>
    <items save="1">
    <text>Debris was observed at crawl space.</text>
    <text>This structure lacks proper and adequate earthquake retrofitting hardware.</text>
    <text>Anchor bolts at exposed sill plate framing structure are loose and inadequate.</text>
    <text>Existing sewer line is not secured or strapped at crawl space.</text>
    <text>All insulations at crawl space must be faced and secured utilizing wires or staples.</text>
    <text>Sub-floors must have R-19 insulation properly installed.</text>
    <text>Crawl space areas must have minimum 18” overhead clearance.</text>
    <text>There was only one crawl space access panel to the rear addition.  We were unable to inspect the main original crawl space due to lack of access.  We highly recommend providing one access panel for the original structure.</text>
    </items>
    <bind match="none"/>
    </field>
    <subform w="28.575mm" name="DropdownAddGOexterior" relevant="-print" x="174.625mm">
    <field h="6mm" name="AddDropdownGOExterior" w="28.575mm" relevant="-print">
    <ui>
    <button highlight="inverted"/>
    </ui>
    <font typeface="Arial"/>
    <caption>
    <value>
    <text>Add Comment</text>
    </value>
    <para hAlign="center" vAlign="middle"/>
    </caption>
    <border hand="right">
    <edge stroke="raised"/>
    <fill>
    <color value="212,208,200"/>
    </fill>
    <corner/>
    </border>
    <bind match="none"/>
    <event name="event__click" activity="click">
    <script contentType="application/x-javascript">//+ GENERATED - DO NOT EDIT (ID:182C1B80-8D7F-46A2-B893-6A7B250C972E CRC:1996671831)
    //+ Type: Action
    //+ Result1: AddInstance("$Node2")
    //+ Node2: form1[0].Report[0].GoExterior[0].ItemsSubFormCrawlSpace[0].DropdownGOCrawl[0].CommentFiel d[0]
    //+ Node1: form1[0].Report[0].GoExterior[0].ItemsSubFormCrawlSpace[0].DropdownGOCrawl[0].DDCrawl[0]. DropdownAddGOexterior[0].AddDropdownGOExterior[0]
    //+ Condition1: Button("$Node1","click")
    //+ ActionName: AddDropdownGOExterior.click
    this.resolveNode('DropdownGOCrawl._CommentField').addInstance(1);
    if (xfa.host.version &lt; 8) {
    xfa.form.recalculate(1);
    /* This button will Add one instance of the repeating subform or table row.
       sSubformSOM: SOM expression of the repeating subform or table row.
       bCalc:  
    Flag - true if the new instance might be referenced by other calculations, otherwise false.
       message:
    The error message displayed.
       These variables must be assigned for this script to run correctly.
       Replace &lt;value&gt; with the correct value.
    var sSubformSOM = "&lt;value&gt;";
    // Example: var sSubformSOM = "xfa.form.form1.Subform1";
    var bCalc = true;
    // Example: var bCalc = false;
    var message = "You have reached the maximum number of items allowed.";
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 10.0.2.20120224.1.869952.867557 - Subform_Instance_Controls_Add.xfo
    // Build the SOM expression of the Instance Manager using the 'underscore' syntax.
    var oSubform = xfa.resolveNode(sSubformSOM);
    // Evaluate the SOM expression.
    var sParentSOM = oSubform.parent.somExpression; 
    // Get the parent SOM expression.
    var sManagerSOM = sParentSOM + "._" + oSubform.name; // Build the SOM expression of the Instance Manager.
    var oManager = xfa.resolveNode(sManagerSOM);
    // Evaluate the SOM expression.
     var nMaxCount = oManager.occur.max;
    // Get the maximum number of subform occurrences allowed.
    var nSubCount = oManager.count;
    // Get the current number of instances.
    // Proceed if the maximum number of subform occurrences has not been reached.
    if ((nMaxCount == "-1") || (nSubCount &lt; nMaxCount)) {
    // Invoke the Instance Manager.
    var oNewInstance = oManager.addInstance(1);
    // Fire the form calculations.
    if (bCalc == true) {
    // Execute all the form calculations.
    xfa.form.recalculate(1);
    } else {
    xfa.host.messageBox(message,"Add Item", 3);
    // END OF DO NOT MODIFY
    </script>
    </event>
    <assist>
    <toolTip>Add an item</toolTip>
    </assist>
    </field>
    <margin topInset="2.54mm" bottomInset="2.54mm"/>
    <?templateDesigner expand 0?></subform>
    <occur max="-1"/>
    <?templateDesigner expand 0?></subform>
    <subform w="203.2mm" name="CommentField" layout="tb">
    <field name="CommentFieldCrawl" minH="8.453mm" w="203.2mm">
    <ui>
    <textEdit multiLine="1">
    <border presence="hidden"/>
    <margin/>
    </textEdit>
    </ui>
    <font typeface="Myriad Pro" weight="bold" size="11pt"/>
    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
    <para vAlign="middle"/>
    <caption reserve="25mm">
    <para vAlign="middle"/>
    <value>
    <text>Comment:</text>
    </value>
    </caption>
    <bind match="none"/>
    </field>
    <occur min="0" max="-1"/>
    <?templateDesigner expand 1?></subform>
    <?templateDesigner expand 1?></subform>
    <margin topInset="2.54mm"/>
    <?templateDesigner expand 0?></subform>
    <subform w="28.575mm" h="11.218mm" name="DropdownAddGOexterior" relevant="-print">
    <field h="6mm" name="AddDropdownGOExterior" w="28.575mm" y="0.138mm" relevant="-print">
    <ui>
    <button highlight="inverted"/>
    </ui>
    <font typeface="Arial"/>
    <caption>
    <value>
    <text>Add Item</text>
    </value>
    <para hAlign="center" vAlign="middle"/>
    </caption>
    <border hand="right">
    <edge stroke="raised"/>
    <fill>
    <color value="212,208,200"/>
    </fill>
    <corner/>
    </border>
    <bind match="none"/>
    <event name="event__click" activity="click">
    <script contentType="application/x-javascript">//+ GENERATED - DO NOT EDIT (ID:85B19E00-052E-47D6-A49E-4675131292BE CRC:2010014197)
    //+ Type: Action
    //+ Result1: AddInstance("$Node2")
    //+ Node2: form1[0].Report[0].GoExterior[0].ItemsSubFormCrawlSpace[0].DropdownGOCrawl[0]
    //+ Node1: form1[0].Report[0].GoExterior[0].DropdownAddGOexterior[0].AddDropdownGOExterior[0]
    //+ Condition1: Button("$Node1","click")
    //+ ActionName: AddDropdownGOExterior.click
    this.resolveNode('ItemsSubFormCrawlSpace._DropdownGOCrawl').addInstance(1);
    if (xfa.host.version &lt; 8) {
    xfa.form.recalculate(1);
    /* This button will Add one instance of the repeating subform or table row.
       sSubformSOM: SOM expression of the repeating subform or table row.
       bCalc:  
    Flag - true if the new instance might be referenced by other calculations, otherwise false.
       message:
    The error message displayed.
       These variables must be assigned for this script to run correctly.
       Replace &lt;value&gt; with the correct value.
    var sSubformSOM = "&lt;value&gt;";
    // Example: var sSubformSOM = "xfa.form.form1.Subform1";
    var bCalc = true;
    // Example: var bCalc = false;
    var message = "You have reached the maximum number of items allowed.";
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 10.0.2.20120224.1.869952.867557 - Subform_Instance_Controls_Add.xfo
    // Build the SOM expression of the Instance Manager using the 'underscore' syntax.
    var oSubform = xfa.resolveNode(sSubformSOM);
    // Evaluate the SOM expression.
    var sParentSOM = oSubform.parent.somExpression; 
    // Get the parent SOM expression.
    var sManagerSOM = sParentSOM + "._" + oSubform.name; // Build the SOM expression of the Instance Manager.
    var oManager = xfa.resolveNode(sManagerSOM);
    // Evaluate the SOM expression.
     var nMaxCount = oManager.occur.max;
    // Get the maximum number of subform occurrences allowed.
    var nSubCount = oManager.count;
    // Get the current number of instances.
    // Proceed if the maximum number of subform occurrences has not been reached.
    if ((nMaxCount == "-1") || (nSubCount &lt; nMaxCount)) {
    // Invoke the Instance Manager.
    var oNewInstance = oManager.addInstance(1);
    // Fire the form calculations.
    if (bCalc == true) {
    // Execute all the form calculations.
    xfa.form.recalculate(1);
    } else {
    xfa.host.messageBox(message,"Add Item", 3);
    // END OF DO NOT MODIFY
    </script>
    </event>
    <assist>
    <toolTip>Add an item</toolTip>
    </assist>
    </field>
    <margin topInset="2.54mm" bottomInset="2.54mm"/>
    <?templateDesigner expand 0?></subform>
    <subform w="203.2mm" name="ItemsSubFormDoorsWindows" layout="tb">
    <draw name="Text3" w="1.471014in" h="5.2331mm">
    <ui>
    <textEdit/>
    </ui>
    <value>
    <text>Doors and Windows</text>
    </value>
    <font size="12pt" typeface="Myriad Pro" baselineShift="0pt" weight="bold" posture="italic" underline="1"/>
    <margin topInset="0.5mm" bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm"/>
    <para spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" marginLeft="0pt" marginRight="0pt"/>
    </draw>
    <subform name="DropdownGODoors" w="203.2mm" layout="tb">
    <occur max="-1"/>
    <subform w="203.2mm" name="DDCommentBtnDoors">
    <keep intact="none"/>
    <occur max="-1"/>
    <field name="DropDownDroors" w="171.45mm" h="9mm" y="0mm">
    <ui>
    <choiceList textEntry="1">
    <border presence="hidden"/>
    <margin/>
    </choiceList>
    </ui>
    <font typeface="Myriad Pro" weight="bold" size="11pt"/>
    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
    <para vAlign="middle"/>
    <caption reserve="25mm">
    <para vAlign="middle"/>
    <value>
    <text>Item:</text>
    </value>
    </caption>
    <items save="1">
    <text>Some windows are original single glazed windows which do not operate properly.  Some have been replaced by wooden windows which are not installed properly.</text>
    <text>Existing wooden patio doors are installed with the hinges exposed at exterior which will allow easy access to intruders.  It also does not allow any space for screen doors at exterior.  Special roll in screen doors should be ordered at interior or reverse the</text>
    <text>Out of plumb windows were observed around the dwelling.  Some windows are plumb on one side and out of plumb on the other side.  We believe it is caused by a combination of sloppy workmanship and structural movements.  Since we were unable to access the cra</text>
    <text>We did not perform a wet test at windows due to lack of permission.</text>
    <text>Window and door trims at siding connections are not installed properly.</text>
    <text>Most wooden windows sustain water damage and are inoperable.</text>
    <text>Broken windows were observed at this dwelling.</text>
    <text>Interior use doors were utilized at exterior.</text>
    <text>Rear door to the laundry area is installed with hinges exposed at exterior which will allow easy access to intruders. </text>
    <text>Missing screens were observed at existing windows.</text>
    </items>
    </field>
    <subform w="203.2mm" name="DropdownAddGOexterior" relevant="-print" y="0mm">
    <field h="6mm" name="AddDropdownGOExterior" w="28.575mm" relevant="-print" x="174.625mm" y="0mm">
    <ui>
    <button highlight="inverted"/>
    </ui>
    <font typeface="Arial"/>
    <caption>
    <value>
    <text>Add Comment</text>
    </value>
    <para hAlign="center" vAlign="middle"/>
    </caption>
    <border hand="right">
    <edge stroke="raised"/>
    <fill>
    <color value="212,208,200"/>
    </fill>
    <corner/>
    </border>
    <bind match="none"/>
    <event name="event__click" activity="click">
    <script contentType="application/x-javascript">//+ GENERATED - DO NOT EDIT (ID:DA5FCB9C-4F98-4657-9C14-49E032341848 CRC:3943787667)
    //+ Type: Action
    //+ Result1: AddInstance("$Node2")
    //+ Node2: form1[0].Report[0].GoExterior[0].ItemsSubFormDoorsWindows[0].DropdownGODoors[0].CommentFi eld[0]
    //+ Node1: form1[0].Report[0].GoExterior[0].ItemsSubFormDoorsWindows[0].DropdownGODoors[0].DDComment BtnDoors[0].DropdownAddGOexterior[0].AddDropdownGOExterior[0]
    //+ Condition1: Button("$Node1","click")
    //+ ActionName: AddDropdownGOExterior.click
    this.resolveNode('DropdownGODoors._CommentField').addInstance(1);
    if (xfa.host.version &lt; 8) {
    xfa.form.recalculate(1);
    /* This button will Add one instance of the repeating subform or table row.
       sSubformSOM: SOM expression of the repeating subform or table row.
       bCalc:  
    Flag - true if the new instance might be referenced by other calculations, otherwise false.
       message:
    The error message displayed.
       These variables must be assigned for this script to run correctly.
       Replace &lt;value&gt; with the correct value.
    var sSubformSOM = "&lt;value&gt;";
    // Example: var sSubformSOM = "xfa.form.form1.Subform1";
    var bCalc = true;
    // Example: var bCalc = false;
    var message = "You have reached the maximum number of items allowed.";
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 10.0.2.20120224.1.869952.867557 - Subform_Instance_Controls_Add.xfo
    // Build the SOM expression of the Instance Manager using the 'underscore' syntax.
    var oSubform = xfa.resolveNode(sSubformSOM);
    // Evaluate the SOM expression.
    var sParentSOM = oSubform.parent.somExpression; 
    // Get the parent SOM expression.
    var sManagerSOM = sParentSOM + "._" + oSubform.name; // Build the SOM expression of the Instance Manager.
    var oManager = xfa.resolveNode(sManagerSOM);
    // Evaluate the SOM expression.
     var nMaxCount = oManager.occur.max;
    // Get the maximum number of subform occurrences allowed.
    var nSubCount = oManager.count;
    // Get the current number of instances.
    // Proceed if the maximum number of subform occurrences has not been reached.
    if ((nMaxCount == "-1") || (nSubCount &lt; nMaxCount)) {
    // Invoke the Instance Manager.
    var oNewInstance = oManager.addInstance(1);
    // Fire the form calculations.
    if (bCalc == true) {
    // Execute all the form calculations.
    xfa.form.recalculate(1);
    } else {
    xfa.host.messageBox(message,"Add Item", 3);
    // END OF DO NOT MODIFY
    </script>
    </event>
    <assist>
    <toolTip>Add an item</toolTip>
    </assist>
    </field>
    <margin topInset="2.54mm" bottomInset="2.54mm"/>
    <?templateDesigner expand 0?></subform>
    <?templateDesigner expand 1?></subform>
    <subform w="203.2mm" name="CommentField" layout="tb">
    <field name="CommentField" minH="8.453mm" w="203.2mm">
    <ui>
    <textEdit multiLine="1">
    <border presence="hidden"/>
    <margin/>
    </textEdit>
    </ui>
    <font typeface="Myriad Pro" weight="bold" size="11pt"/>
    <margin topInset="1mm" bottomInset="1mm" leftInset="1mm" rightInset="1mm"/>
    <para vAlign="middle"/>
    <caption reserve="25mm">
    <para vAlign="middle"/>
    <value>
    <text>Comment</text>
    </value>
    </caption>
    </field>
    <occur max="-1" min="0"/>
    <?templateDesigner expand 0?></subform>
    <?templateDesigner expand 1?></subform>
    <?templateDesigner expand 0?></subform>
    <subform w="28.575mm" h="11.218mm" name="DropdownAddGOexterior" relevant="-print">
    <field h="6mm" name="AddDropdownGOExterior" w="28.575mm" y="0.138mm" relevant="-print">
    <ui>
    <button highlight="inverted"/>
    </ui>
    <font typeface="Arial"/>
    <caption>
    <value>
    <text>Add Item</text>
    </value>
    <para hAlign="center" vAlign="middle"/>
    </caption>
    <border hand="right">
    <edge stroke="raised"/>
    <fill>
    <color value="212,208,200"/>
    </fill>
    <corner/>
    </border>
    <bind match="none"/>
    <event name="event__click" activity="click">
    <script contentType="application/x-javascript">//+ GENERATED - DO NOT EDIT (ID:23EFDB6C-2F4B-4F54-A6AC-CD20621C6CE2 CRC:1796082201)
    //+ Type: Action
    //+ Result1: AddInstance("$Node2")
    //+ Node2: form1[0].Report[0].GoExterior[0].ItemsSubFormDoorsWindows[0].DropdownGODoors[0]
    //+ Node1: form1[0].Report[0].GoExterior[0].DropdownAddGOexterior[1].AddDropdownGOExterior[0]
    //+ Condition1: Button("$Node1","click")
    //+ ActionName: AddDropdownGOExterior.click
    this.resolveNode('ItemsSubFormDoorsWindows._DropdownGODoors').addInstance(1);
    if (xfa.host.version &lt; 8) {
    xfa.form.recalculate(1);
    /* This button will Add one instance of the repeating subform or table row.
       sSubformSOM: SOM expression of the repeating subform or table row.
       bCalc:  
    Flag - true if the new instance might be referenced by other calculations, otherwise false.
       message:
    The error message displayed.
       These variables must be assigned for this script to run correctly.
       Replace &lt;value&gt; with the correct value.
    var sSubformSOM = "&lt;value&gt;";
    // Example: var sSubformSOM = "xfa.form.form1.Subform1";
    var bCalc = true;
    // Example: var bCalc = false;
    var message = "You have reached the maximum number of items allowed.";
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - 10.0.2.20120224.1.869952.867557 - Subform_Instance_Controls_Add.xfo
    // Build the SOM expression of the Instance Manager using the 'underscore' syntax.
    var oSubform = xfa.resolveNode(sSubformSOM);
    // Evaluate the SOM expression.
    var sParentSOM = oSubform.parent.somExpression; 
    // Get the parent SOM expression.
    var sManagerSOM = sParentSOM + "._" + oSubform.name; // Build the SOM expression of the Instance Manager.
    var oManager = xfa.resolveNode(sManagerSOM);
    // Evaluate the SOM expression.
     var nMaxCount = oManager.occur.max;
    // Get the maximum number of subform occurrences allowed.
    var nSubCount = oManager.count;
    // Get the current number of instances.
    // Proceed if the maximum number of subform occurrences has not been reached.
    if ((nMaxCount == "-1") || (nSubCount &lt; nMaxCount)) {
    // Invoke the Instance Manager.
    var oNewInstance = oManager.addInstance(1);
    // Fire the form calculations.
    if (bCalc == true) {
    // Execute all the form calculations.
    xfa.form.recalculate(1);
    } else {
    xfa.host.messageBox(message,"Add Item", 3);
    // END OF DO NOT MODIFY
    </script>
    </event>
    <assist>
    <toolTip>Add an item</toolTip>
    </assist>
    </field>
    <margin topInset="2.54mm" bottomInset="2.54mm"/>
    <?templateDesigner expand 0?></subform>
    <subform w="203.2mm" name="ItemsSubFormDriveWay" layout="tb">
    <draw name="Text3" w="29.2864mm" h="5.2331mm">
    <ui>
    <textEdit/>
    </ui>
    <value>

    Hi guys,
    I don't think, that it is possible to change the values of the dropdown by changing only the xml-file.
    I found another solution:
    1. open the form in Acrobat Pro
    2. select in the menu bar Form->Manage Form Data->Import Data
    3. choose your current xml-file
    4. save the form
    Now the values are available.
    To change the values, you have to repeat these 4 steps with a new xml-file.
    regards
    Martin

  • Dynamic Dropdown for Country can Phone Code

    Hi,
    Can anyone show me how to create a Dynamic List for Country and Phone Code. Select a country from dropdown menu and it reloads the page to show the coutry phone code in a text field.
    Example:
    -- It shows a list of country
    -- When a country is selected, it populate the selected country phone code to a text box on the same page.
    Let say, Choose UK country and it auto populate the Phone Code "44" to the text field box on the same page.
    Please advice.
    Thank you

    I exactly know the solution you need.
    But please dont forget to award me the 4 duke dollars if you are satisfied with my solution.
    The solution:
    <select size="1" name="country" onChange="myFunc()">
    <option value="">Please select ..</option>
    <option value="0001$91">India</option>
    <option value="0002$81">Japan</option>
    <option value="0003$44">UK</option>
    </select>
    <p><input type="text" name="myTextField" size="5"></p>
    <script>
    function myFunc()
    var ind =document.forms[0].country.selectedIndex;
    if(ind!= -1)
    var phoneCd = document.forms[0].country[ind].value.substring(5);
    alert(phoneCd );
         document.forms[0].myTextField.value=phoneCd
    else
    document.forms[0].myTextField.value="";
    //alert("my 4 duke dollars pls ;-)");
    </script>
    As you can see in the above dropdown menu "country" that I have defined the phone code in the value after the "$" symbol.
    Simply substring the portion after the $ symbol and you get the phone code.
    Lemme know if this helps ..
    -Rohit
    Message was edited by:
    RohitKumar

  • Dynamic dropdown filling in offline form

    Hi,
    I have a internal table contaning some values, i have binded my dropdown element wih the field of the table containing the values, however i see only the first value in the table and its an offline form.
    Correct replies will be well rewarded.

    Hi,
    Open the form in the designer.
    Go to Tools -- Options -- Data Binding
    Check "Show Dynamic Properties" and close it.
    Select the dropdown
    Go to Object Palette, Cell tab
    List Items will now be a link .... click on it...
    Navigate to the node having the data for dropdown
    eg. $record.NODE_01.DATA[*]
    Item Text myText
    Item Value myValue
    (Assuming NODE_01 has attributes myText and myValue)
    Apart from this, make the following checks, in WD4A if the displayType is Native create dropdown from Web Dynpro Native Library, if displaytype = ActiveX, create dropdown from WebDynpro ActiveX Library
    Also what is the layout Type for the form???
    Regards,
    Reema.

  • Dynamic dropdown based on user selection of another dropdown on the same page

    hi all, ok, I have a table which contains use data, a name,
    and a userID. for the example lets say "Simon Bullen" and my userID
    is "999".
    on a form I have, there is a dropdown box, which is dynamic
    from this table, and allows me to select Simon Bullen, however, I
    have a hidden field on the form, which when the user selects "simon
    bullen" the hidden field populates with the appropiate U number
    from the same table.... no i thought this would do it:
    <cfquery name="userNumber" datasource="userList">
    SELECT userNumber FROM dbo.Users WHERE Name =
    <cfqueryparam value="#form.Name#">
    </cfquery>
    and then my dynamic form field (hidden) would reference to
    this query....
    but it doens't work, could somebody please enlighten me? I'm
    hoping its something silly
    Thanks in advance

    You could make the value of the option the UserID and the
    option display the name.
    If that isn't what you need, I think you'll need some
    javascript to populate your hidden field based on what is chosen in
    the select.
    I think you can modify this:
    http://www.javascriptkit.com/javatutors/selectcontent2.shtml
    ...to populate your hidden field instead of a new select
    list.
    If there's a way to do that without JS I'm not aware of it.
    A third possibility: look up the UserID (based on the name
    chosen) after the form is submitted then do with it whatever you
    need to.

  • Problem with two dynamic dropdowns

    I have four screens each one with two dropdown's in a child parent relationship with one constrained by the other. Both uses dynamic domains against entity views with the child passing a bind variable containing the value of the parent. The problem I am seeing is that when I enter the detail screen for a row then the child dropdown is populated correctly. When I leave the detail screen and return to the summary only rows with the same primary column value will have the secondary populated.
    e.g. Summary Screen
    Id | Department | Employee
    =========================
    1 | Finance | Jones
    2 | Finance | Smith
    3 | Engineering |
    4 | Engineering |
    5 | Admin |
    If I enter the detail form for the first row and change nothing but simply return to the summary, then rows 1 and 2 with primary 'Finance' will have employee populated but if I open row three with primary 'Engineering' then only rows 3 and 4 will have employee populated.
    It looks like the bind variable that limits the secondary dropdown values, gets set in the form view so that when you return to the table view only values from that limited set get displayed.
    (The differences between the four screens are related to fields other than the two dropdowns)
    Screen1 View for primary lookup:
    ==============
    Table name: Lookup
    Column1: CompositeId
    Column2: Description
    SQL:
    <pre>
    SELECT
    Lookup.Id,
    Lookup.Description
    FROM cv_claims.LOOKUP Lookup
    WHERE LookupName = 'screen_1'
    </pre>
    View for secondary lookup
    ================
    Table name: LookupAssociation
    Column1: FromLid
    Column1: ToLid
    SQL:
    <pre>
    SELECT
    Lookup.Key,
    Lookup.Description
    FROM LOOKUP Lookup
    WHERE Key IN (SELECT ToLid FROM LOOKUP_ASSOCIATION WHERE FromLid = ?)
    </pre>
    Bind variables: FromLid
    Bind variable in dynamic domain for screen 1
    =============================
    FromLid=#{bindings.S01EmployeeLid.inputValue}
    Any suggestions would be appreciated.
    Thanks,
    Pascal

    Hi Pascal,
    Did you follow the instructions in section 6.12.2 of the Oracle JHeadstart 10g for ADF (10.1.3.2) developer's guide?
    Regards,
    Ibrahim

  • Regarding the creation of dynamic view by clicking on a tree.

    Hi all:
          There are two parts on the window. the left part is a tree with three  tree nodes, by clicking on tree nodes, the other is an area to show the business content.
         for example, three tree nodes are respectively "input customer infor", "change customer infor", "view customer infor".
        the initial view is input customer infor, I know how to create the view initially in method init or wddomodifyview, but when I click tree node like "change customer infor", how create the view , or how to refresh the view , that is to say, to delete old elements in the view of " input customer infor".
        can you please give me a hint?
       Thank you very much !

    Hello,
    be wary of always creating the view and then just assigning the visbility of the given view container. Although this is quite simple, it means that the WD events are still called for the view - especially where tree might be built, the associated logic could be quite intensive. It is better to only call this logic when needed.
    Embedding the views in a single view container - and dynamically switching the assignment would ensure only the selected view would be called.
    I would strongly advocate the FPM to do some of this - but unfortunately it doesn't (yet) have a layout that would easily support your two pane view (if you really need this). However it does have a guided activity floorplane (GAF) which is the standard for this sort of select,  edit, save, confirm sort of work - if you want your users to have a similar experience to the rest of SAP's delivered apps, it would certainly be worth considering.
    good luck,
    Chris

Maybe you are looking for