Drop down list setSelected not working

Hi all,
I have a drop down list bound to a database (value: int, display: string). There are two pages:
page 1: a table with id needed for page 2 (id passed through the url)
page 2: drop down list bounded to a database. The selected value comes from page 1.
Problem: Even though I am getting the correct value, and am using ddList.setSelected (id), the ddList value does not change.
I basically want to know how to program the functionality of the "selected" property in java with a table bound to a database.
Any ideas?

Hi There,
Looks like a user on this thread was able to set his drop down list value dynamically, take a look
http://forum.java.sun.com/thread.jspa?forumID=881&threadID=5055898
here is what the user comments
Any way I have solved my problem
1.Change the value field of dropdown from int to string, so value field and display fields are same.
2. dropdown1.setvalue("abc");
this solution will only work if the value field is String.
Hope it helps
Thanks
K

Similar Messages

  • JS Validation for Drop down List is not working in Oracle PL/SQL Package

    Hi All,
    I am facing an issue with JavaScript validation done in Oracle PL SQL package.
    System Requirement:
    There is one screen which contains two fields viz. FLD 1 & FLD 2 and one 'Submit' button.
    FLD 1 and FLD 2 fields are drop down list boxes.These are mandatory fields.
    The screen is developed in Oracle Mod PL SQL package.
    The html coding and java scripting are embedded in the respective Oracle PL SQL Package procedure which generates this screen,takes the input values provided by user,does the
    field validations and submits the form.
    Issue:
    The javascript validation for FLD 2 dropdown is working successfully.
    When the user leaves this field as blank,the embedded javascript pops up an error message 'Selection of FLD 2 is manadatory before submitting the form!'.
    As FLD 1 is also a mandatory field,the javascripting validation should pop up the similar error message 'Selection of FLD 1 is manadatory before submitting the form!'.
    But,this first field validation is not at all working.
    The system allows to submit the form even if the 'FLD 1' is left blank.
    The javascript code sysntax for validation of FLD 1 & FLD 2 drop down list boxes as follows:
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    I am viewing the screen from the web browser IE version 8.0.
    Your timely help will really be appreciated.
    Regards & Thanking in advance,
    Alka

    Hi,
    1. Your problem is actually related to JavaScript, not SQL and PL/SQL. So, this is the wrong forum to post. The closest to JS is the Application Express forum {forum:id=137}. Clearly state that it is not an Apex issue and that you are looking for JS help.
    2. Your JS code, the way you has posted it, is syntactically incorrect, so if you post on Apex forum put the correct code and in tags as described in the FAQ
    {quote}
    function validate_form_fields()
    if (document.forms[0].p_fld_1.selectedIndex == 0))) || (document.forms
    [0].p_fld_1.selectedIndex < 1 )
    alert("Selection of FLD 1 is manadatory before submitting the form!!!");
    return false;
    else if (document.forms[0].p_fld_2.selectedIndex == 0))) || (document.forms
    [0].p_fld_2.selectedIndex < 1 )
    alert("Selection of FLD 2 is manadatory before submitting the form!!!");
    return false;
    return true;
    {quote}
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Drop down list does not work in EPM

    Hi SAP Experts,
    One of my user is not able to view the Annual view in the EPM Report after selecting the Annual view option.
    When he selects the ‘Annual’ from the column D18, EPM does not display the Annual view.
    Still it shows the Monthly view in Row 24.
    Could you please guide me on how to fix this issue and what could be the reason.
    SAP_BW  RELEASE 731  SP LEVEL 0011
    BPC NW 10.0
    EPM 10.0 SP17 .NET 3.5
    Regards,
    Raj.

    Hi Jeff,
    Yes. It works for other users with additional team access.
    This is the first time, particular user tries. We have not made any changes to the report.
    Particular user has less access permissions when compare with other users.
    Regards,
    Rajesh.

  • Reg: Drop-Down list Box not  displaying values

    Hi Experts,
                     i am publishing a module pool program in the internet using SICF Transaction . In the internet my drop down list box is not displaying the default value  but in my sap it works fine .
    What may be the problem?
    Regards,
    Vikram

    Hello Thorsten Domsalla ,
                      My Problem is in my sap module pool program there is a drop down list box which disaplays  default values its working fine in sap gui but when i access through internet (SICF) Transaction the Drop down list box not listing out default values .
    i am using Integrated ITS Version 7.0 and Support package 08.
    Regards,
    Vikram

  • I have Adobe Acrobat XI (ver 11.0.07).  Adobe Help instructs me to find the document comparison command at "View Compare Documents," however, this command does exist on my screen. My View drop-down list does not include a command for Compare Documents.

    I have Adobe Acrobat XI (ver 11.0.07).  Adobe Help instructs me to find the document comparison command at "View > Compare Documents," however, this command does exist on my screen. My View drop-down list does not include a command for Compare Documents.  Where else can I find this command?

    What version of Acrobat do you have? This feature is only available in the Pro version, not in the Standard version.

  • I am using Windows XP and just installed Elements 12. When I try to select a different brush or shape the drop down list will not stay open long enough to select a different item. I have used Elements 9 for awhile and have not had this problem

    I am using Windows XP and just installed Elements 12. When I try to select a different brush or shape the drop down list will not stay open long enough to select a different item. I have used Elements 9 for awhile and have not had this problem

    grannybel
    It would appear that you are destined for the Adobe Photoshop Elements Forum since your question is related to Photoshop Elements and not Premiere Elements which is the focus program where you have posted.
    But, while the arrangements are being made, here are a few things for you to think about if you have not already
    1. Reset Tools - Select Brush Tool, then
    2. Delete Settings File
    Go to Full Editor/Edit Menu/Preferences/General and click on the option "Reset Preferences on Next Launch".
    We will be watching for your progress.
    Thank you.
    ATR

  • Drop down boxes are not working in joomla

    on a joomla website which i am an admin for actually i am an admin for multiply one but the drop down boxes are not working on any of them it is kind of being a pain

    Are there any error messages in the Web Console (Firefox/Tools > Web Developer) about this?
    *https://developer.mozilla.org/Tools/Web_Console

  • Category drop down list does not show all taskes

    Hi, I created a project using product Upgrade Assitant for Release 12. I did not add any customized tasks. I just need to run the default tasks for upgrading 11i to r12. I did the setup following Maintenance Wizard User Guide Release 2 without any problem. But when I try to run the steps, the category drop down list only show one task: Configuration. Where are all other categories? Thanks

    Hi, Thank you for the reply. I did successfully finished all the 4 tasks for the configuration category without any errors. I want to continue with other tasks. But the drop down list does not show anything else except Configuration. From the user guide:
    Important Notes:
    • To view the full list of categories applicable to your installation, you must complete all of the steps in the Configuration category. When you complete these steps, you must refresh the lower left pane of your Web browser. The entire list of categories appears.
    What does this mean "you must refresh the lower left pane of your Web browser". I don't see anything to be refreshed. But even after I restarted mw (it must be refreshed now), the category list still now shown.

  • My Drop Down Menus Do Not Work Properly in IE

    Hey. I'm really stuck and have been for over a week. Let me preface this by telling you I didn't build our website and have little knowledge of spry and spry assets. I can't the get the gentleman that built our site to help and I'm desperate!
    The site - www.ncsoccer.org , has drop down menus. They work fine in Chrome, FF and Live Preview (DW CS4). But in IE8, they do not.
    I had to revise the drop downs (changing names and removing some drop downs - I've done this with no problem before). When I uploaded the index page and the template pages, the error started.
    In addition, the people in my office that use Contribute to update their sections, cannot access anything but our index page and I don't know what (if anything) I've done wrong, as everything worked fine before the menu revision.
    I'm including the 'sprymenubarhorizontal.css" code below. Maybe you can see something that isn't right.
    Thanks for any insight or suggestions. Remember, asking me to create to create sprys or widgets or something like that may be over my head! Try to dumb it down for me!
    Thanks.
    Mark
    (sprymenubarhorizontal.css code)
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    cursor: default;
    width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
    z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    position: relative;
    text-align: left;
    cursor: pointer;
    width: auto;
    float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
    margin: 0;
    padding: 0;
    list-style-type: none;
    font-size: 100%;
    z-index: 1020;
    cursor: default;
    width: 15em;
    position: absolute;
    left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
    left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
    width: 15em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
    position: absolute;
    margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
    left: auto;
    top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
    border: 1px solid #CCC;
    width: auto;
    background-attachment: fixed;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
    display: block;
    cursor: pointer;
    background-color: #ffffff;
    padding: 0.3em 0.75em;
    color: #000;
    text-decoration: none;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
    background-color: #cccccc;
    color: #000;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
    background-color: #cccccc;
    color: #000;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
    background-image:  url("SpryMenuBarRight.gif");
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
    background-repeat: no-repeat;
    background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
    background-image:  url("SpryMenuBarRightHover.gif");
    background-repeat: no-repeat;
    background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
    position: absolute;
    z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;

    A;though the CSS is very well documented, there are those that ignore those signs. Look at the following
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 100%;
        position: relative;
        text-align: left;
        cursor: pointer;
        width: auto;
        float: left;
    The rest have been given a width of 15em, so this value may be a good start.
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border: 1px solid #CCC;
       width: auto;
        background-attachment: fixed;
    Just keep the border property and remove the other two.
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
    ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;
    The following is the original for the above
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
        filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FFF;
    Cheers,
    Gramps

  • My Drop down list won't work in Adobe Reader 9

    I have a form that I created in Adobe Designer 7 but have opened and saved in Adobe Designer 9 (also redid the connection string, because it didn't like 7's). Now I can open and use the form normally in Adobe Acrobat Pro 7 and 9 and in the PDF previews of both Designers. But Adobe Reader 9 won't let the drop down list function the way it is supposed to. Also my form has fields that are binded to a SQL Server 2K5 database.
    Now if Adobe Reader does not allow database connections or fields binded to them, is there a way to get similar functionality in any way?

    Reader Extended? Is that when you open the PDF in Acrobat Pro, go to Advanced, and click "Extend Features in Adobe Reader"? I did that and it still didn't work. Matter of fact it locked up the PDF when I tried to open it in Acrobat Pro 7 or 9.
    Or is that Adobe Reader Extension ES package?

  • Excel Cells that are 'Pick from drop down list" could not be read through ADODB.recodset

    Dim ExcelConn As ADODB.Connection
            Dim ExcelRs As ADODB.Recordset
            Dim iidx As Integer
            Set ExcelConn = CreateObject("ADODB.Connection")
            ExcelConn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\RRAJENDRAN\Desktop\Final Report Template.xls; Extended Properties=""Excel 8.0;HDR=YES;"""
            ExcelConn.Open
            iidx = 2
            Set ExcelRs = CreateObject("ADODB.Recordset")
            ExcelRs.Open "Select * FROM [Input$]", ExcelConn, 1, 3
            Do While Not ExcelRs.EOF
                    Select Case iidx
                        Case 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
                            Debug.Print iidx & ":" & ExcelRs.Fields(18).Value
                    End Select
                ExcelRs.MoveNext
                iidx = iidx + 1
            Loop
            ExcelRs.Close
            ExcelConn.Close
    The blank values correspond to cells that are drop -down lists
    8:
    9:8/11/2014
    10:8/14/2014
    11:8/15/2014
    12:
    13:
    14:
    15:
    16:
    17:
    18:
    19:
    Raju Rajendran

    Hi Raju,
    Base on my test in excel 2013, it works fine.
    Create a new excel file and save as xls
    Add data (data validation for dropdownlist)
    What’s the version of your excel? Could you reproduce that issue in a new file? You may share the sample file on the OneDrive.
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Multi-Select (drop down list) data not saving upon save/email

    I have created a drop down list and modified it to allow multiple selection, i.e.
    form1.BusinessAreaTable[1].Row1[4].ERP::ready:form - (JavaScript, client)
    this.ui.choiceList.open= "multiSelect"; this.rawValue
    = "-1"
    However, when I go to save the form and/or email the list fields erase and the data / items I selected are gone.
    Please help, thanks.

    Okay, I have the form now.
    You are using script in the form Ready event to make a dropdown list mimic a listbox. This is totally unnecessary. I have changed the ERP to a multi-select listbox in the Object > Field palette and commented out the script.
    Here is the form: https://acrobat.com/#d=K*P4xKIA4kkqEHGTpgyvvw
    The form has not been Reader Enabled, so user with Reader will not be able to save the data inputted or submit by email in PDF format:
    Summary here:
    http://assurehsc.ie/blog/index.php/2010/05/using-livecycle-forms-in-acrobat-and-reader/
    Niall

  • Drop-down list will not allow custom entry

    I've got a drop down list on my form, with the 'Allow Custom Text Entry' checkbox checked. However, when I attempt to type in custom text, as soon as I focus away from the drop down via tab or clicking on another element, the text that I typed in disappears. The only text that I can get to submit is what is contained in the pre-defined list items. However, when I create a new form with nothing but the drop-down, it works fine...

    Yes this is a bug with Dynamic Forms in 7. There was a post before with a workaround -
    Custom Text disappears on exit when using Dynamic Forms

  • Drop down system does not work just flickers an example can not put an email into a folder

    the drop down system doesn't work an example when I try to put an email into a folder when I click on the move message to location all the folder references just flicker and do not allow me to click on any thing another example when I tried to entered data into the "This happened" block below I just got flickering. This happened over the last few days and happens every time I try to use the drop downs

    Try to disable hardware acceleration.
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    If disabling hardware acceleration works then check if there is an update available for your graphics display driver.
    *https://support.mozilla.org/kb/how-do-i-upgrade-my-graphics-drivers

  • Drop-down list won't work at the bottom of a page

    I'm having a problem in my forms with drop-down lists that are situated at the bottom of a page. When the list drops down, only the first few values can be chosen. Any that fall too far down the list, and thus hover over top of the next page, cannot be selected. In this situation, the scroll bar for the list actually scrolls the entire document. Very weird. Has anyone expreienced this before? Perhaps I'm making a simple mistake.

    Does it help if you disable hardware acceleration ?
    *Tools > Options > Advanced > General > Browsing: "Use hardware acceleration when available"
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *https://hacks.mozilla.org/2010/09/hardware-acceleration/

Maybe you are looking for

  • My itunes crashes every time I sync. APPCRASH

    Problem signature:   Problem Event Name:    APPCRASH   Application Name:    iTunes.exe   Application Version:    10.5.3.3   Application Timestamp:    4f14cc3d   Fault Module Name:    StackHash_5ed1   Fault Module Version:    6.1.7601.17725   Fault Mo

  • How to use TimeCapsule as an external hard drive and thats it

    I used have to internet wifi with my TC but now I recently moved and no longer wish to get internet. But can I use my TimeCapsule as an external hard drive only? If so, how do I do this? What kind of cable do I need? (I missplaced the cable that came

  • External volume not working on latest gen iTouch

    All of a sudden, the external speakers stopped working on my iTouch...it's the latest gen. I've checked every setting I can find. I have updated my iTunes/Apple software. My earphones work. When I listen to a song or watch a video, the audio 'bar' do

  • Right-click Flash selection of webcams no longer works. Bug?

    After some tense struggles and several failed webcam swaps, our support team discoverd that using right-click to select a webcam no longer works after our hosted service's recent upgrade. Is this necessary, or a bug?

  • JTree as cell renderer for JList

    I have an application that requires to display a list of tree-structured data. So I've used JTree a the cell renderer for the JList, and I can see a list of trees with that data in. However, the Jtree doesn't respond to Mouse messages, even if I disp