Cannot make a dynamic  select list

I couldn't make a dynamic select list in a jsp. please help

<select name='item'>
               <option value='-1'>Select Option</option>
<%
               rs=stmt.executeQuery("select * from item_master");
               while (rs.next())
%>
                         <option value='<%= rs.getString("item_code") %>'
<%
                         if (rs.getString("item_code").equals(stritemcode))
                              out.println(" selected ");
%>
                         ><%= rs.getString("item_description") %></option>
<%
%>
               </select>
Hope the code snippet helps you. Here stritemcode is the value that should be selected. Amol

Similar Messages

  • In iTunes under my device, under the apps tab, Why are all the options shaded out?  I cannot make any changes, select any apps or do anything with the apps.  I was able to load a few apps and sync but cannot sync anymore to my phone.

    In iTunes under my device, under the apps tab, Why are all the options shaded out?  I cannot make any changes, select any apps or do anything with the apps.  I was able to load a few apps and sync but cannot sync anymore to my phone.

    Hi,
    ( I search for iChat questions when I have finished in the iChat Forum)
    So the menu bar reads iChat, File,  Edit,  View, Buddies, Video, Window and Help
    There is no Buddy List open.
    There is no other window for iChat open.
    In the iChat Menu you only have access to Status.
    Is an item ticked in the list ?
    Is this a green (Available item) or  Red ( an Away one) ?
    Can you access the Accounts option ?  (Sitll in the iChat Menu)
    Is anything in here ticked ?
    In the Window menu any Logged in account should appear in the list  (Between the Next Chat and File Transfer items)
    It would be useful to know which version of iChat this is.
    If no account is ticked (iChat Menu > Accounts) or not showing in the Window Menu, plus you cannot determine the Status and you cannot access the Preferences then you need to access your Home Folder/Library/Preferences
    As the Library in the Home Holder is Invisible in Lion you will need the Finder's Go Menu > Go to Folder option  (you can use it in earlier OS versions if you want)
    Type in:-
    ~/Library/Preferences
    Find the file called com.apple.ichat.plist
    Drag it to the Trash and Restart iChat.
    This will lose all the settings in iChat that you have changed from Defaults but there is no way around this.
    9:23 PM      Saturday; August 27, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Dynamic Select List - XML and umlaut

    Hi, I've recently implement a dynamic select list as per [this thread|http://forums.oracle.com/forums/thread.jspa?threadID=327306], however it seems to break if I have any words containing an umlaut. I've tried setting the header on the Application Process to UTF-8 (OWA_UTIL.mime_header ('text/xml', FALSE, 'utf-8');) but it doesn't seem to make any difference. The word in particular giving me problems is Kühne - it's the only non english entry so far, but I would expect others in the future.
    Does anyone have any ideas how to allow this character to be parsed correctly? Short of using replace to check for this and every other possible character I'm not sure what else to do.
    Thanks

    Pete88 wrote:
    Hello
    I would like to create a dynamic select list where you can start entering a name and select list reduces with each character entered.
    E.g. A list of towns in the UK where you want to select London. This list is delay as normal and as start typing by the time you have entered “Lon” the list only has few names starting with “Lon”
    I expect I need a JavaScript to active this?Not in APEX 4.x. Use a Text Field with autocomplete item.

  • Dynamic Select List in Reports

    Hi,
    I have come across solutions to implement dynamic Select Lists. But can the same be implemented in a report.
    I have a report of 2 columns which are select lists. The Value of one depends of the other.
    Can this be done?
    Thanks in Advance

    Hi Abdullah,
    Thanks for the Tip. However, couple of queries.
    1) The first modification involves changing the query to : select lov_pkg.savekey() , colA, colB, ... But the function savekey takes a value.
    Ideally, I need this function to be called while loading and when the first select list is changed. How can this be done.
    2) Also, To make this change in query, I had to use (Use Generic Column Names (parse query at runtime only)) option. Now my Add Row button doesnt work? Can you tell me how that can be customized.
    Thanks,
    Sunil

  • Creating a dynamic Selection List based on a View Object

    Hello,
    I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
    Maybe someone had experience about creating this already. Please give me a tip or a little example.
    Thanks.

    http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html

  • Dynamic select list crashes with php

    HI All,
    I can't seem to get a dynamic select list to work in
    dreamweaver. It completly crashes everytime I try adding it to my
    page. I found someone else in the forum who had the same problem
    but no one ever responded. I've tried several things including
    putting just the record set and dynamic select on it's own page
    with no other code on it. It still crashes DW. I also tried coding
    it myself by making a listmenu and modifying it so that the option
    value equals a PHP echo of a value. It crashed there too. Does
    anyone have a piece of code with a working dynamic select list that
    uses a record set that I could look at? That way I can see where
    I'm going wrong. All I'm trying to do is get a simple drop down
    select list of employee names so someone can choose their name to
    get commission. It's a one table, 2 fields (first & last name)
    record set.
    Using DW CS3, php & MySQL.,windows XP Pro
    Any help would be really appreciated!

    AthroughZ wrote:
    > I can't seem to get a dynamic select list to work in
    dreamweaver. It
    > completly crashes everytime I try adding it to my page.
    It looks as though you have a corrupt cache file. Follow
    troubleshooting
    step 4 in the following technote:
    http://www.adobe.com/go/tn_19105
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • Dynamic select list with display,return val & join condition issue.

    hello,
    I am having a dynamic select list with display, return value
    say for example my select statement is
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (e.deptno=dt.deptno)
    where (condition)
    when i tried this query for my select list, it is not working. It saying that
    " LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query. "
    I am not able to understand the problem. Can anyone help me out with this issue?
    thanks.

    Shouldn't your join have dept as the driving table?
    select distinct dname d, deptno r
    from dept dt
    right join emp e on (dt.deptno = e.deptno)
    where (condition)
    Or using older Oracle standard join
    select distinct dname d, deptno r
    from dept dt, emp e
    where (dt.deptno (+) = e.deptno) AND (OTHER WHERE condition)
    OR
    (Since a right join is just getting the values from the driving table that are NOT in the associated table)
    select distinct dname d, deptno r
    from dept dt
    WHERE dt deptno NOT IN (SELECT deptno FROM emp) AND (OTHER where condition)
    Thank you,
    Tony Miller
    Webster, TX

  • Dynamic select list: link to another page

    Hi
    Have following dynamic select list at the bottom in "product.php" page (www.dolls.com.sg)
    <div id="selectcat">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>"<?php if (!(strcmp($row_rsCategories['categoryName'], $row_rsCategories['categoryName']))) {echo "selected=\"selected\"";} ?>><?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
    My target is, whenever a visitor clicks on a category in the pull down menu, he is forwarded to the respective "categories.php" page.
    How can I do that?
    Thanks
    Helmut

    Change your code to this:
    <div id="selectcat">
    <form method="get" action="categories.php">
      <select name="Categories">
        <?php
    do { 
    ?>
        <option value="<?php echo $row_rsCategories['categoryName']?>">
        <?php echo $row_rsCategories['categoryName']?></option>
        <?php
    } while ($row_rsCategories = mysql_fetch_assoc($rsCategories));
      $rows = mysql_num_rows($rsCategories);
      if($rows > 0) {
          mysql_data_seek($rsCategories, 0);
       $row_rsCategories = mysql_fetch_assoc($rsCategories);
    ?>
      </select>
      <input type="submit" value="View Dolls">
    </form>
    </div>
    In categories.php, use $_GET['Categories'] to filter the recordset.

  • Creating dynamic select list

    I have a dynamic select list populated by site names and URLs from a map; when a user clicks on an entry the site name and URL will fill two text boxes. There are also buttons to add, update, and delete entries. These buttons lead to actions within my JPF file.
              When I select an entry to delete, the script runs a delete SQL statement again my Ora db instance, then the page content is repopulated. I want to know how come when I do that I always get the sequence ID of the just deleted entry at the end of my select list.
              Here is a snippet of what I've got:
              JSP:
                        <netui:select
                dataSource="{actionForm.siteList[0]}"
                optionsDataSource="{actionForm.itemOptions}"
                size="4"
                tagId="siteList">
              <netui:textBox
                dataSource="{actionForm.title}"
                size="30" maxlength="200" tagId="title"/>
              <netui:textBox
                dataSource="{actionForm.url}"
                size="30" maxlength="200" tagId="url"/>
              <netui:hidden dataSource="{actionForm.key}"
                tagId="key"/>
              <script language="javascript">
                <!--
                <%=session.getAttribute("jsArray")%>
                  function siteClicked()
                    var index =
                      document[getNetuiTagName("process",this)]
                      [getNetuiTagName("siteList",this)][
                        document[getNetuiTagName("process",this)]
                        [getNetuiTagName("siteList",this)]
                        .selectedIndex]
                      .value
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("key",this)].value
                      = index;
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("title",this)].value
                      = siteArray[ index ][0];
                    document[getNetuiTagName("process",this)]
                    [getNetuiTagName("url",this)].value
                      = siteArray[ index ][1];
                -->
              </script>
                                  JPF:
                        Connection conn = null;
              query = "delete from stlnt_other_ref_sites " +
                      "where stlnt_ors_site_id = " + form.getKey();
              try {
                pstmt = conn.prepareStatement( query );
                pstmt.executeUpdate();
              } catch (SQLException ex) {
              try {
                Map map = new LinkedHashMap();
                while ( rs.next() )
                  map.put(new Integer(rs.getInt(1)), rs.getString(2));
                  jsArray += "siteArray[" + rs.getInt(1)
                    + "]=new Array(\"" + rs.getString(2)
                    + "\",\"" + rs.getString(3) + "\");";
                  hasResults = true;
                options = map;
                getSession().setAttribute("jsArray",jsArray);
                getSession().setAttribute("hasResults",
                  String.valueOf(hasResults));
              } catch (SQLException ex) {
              

    OK I got it working... Mostly... I don't know if it was a combination of changes that made the difference, but I'll put down what I did. First, I switched my select object in the form bean into just a string type from a string array (it was allowing the selection of one entry anyways). Second, rather than just blanking out the options map, I also blanked out the select object [eg form.setSelect("")].
              Now when I select an entry and click delete, the resulting select list is short one visible element. However, you can still select the blank spot where that last entry used to be. However, this is not a huge issue for me now; I will investigate this at a later time.

  • Default value dynamic select list

    Hi everybody,
    I have a question concerning dynamic select lists.
    I have a report of a table that shows some records. Each record has different versions of data. So when you click on a record you get to another page where you get some information about this record and where you can select the version of this information (with the help of a select list).
    The select list works fine and is defined dynamically as follows:
    select distinct a.name display_value,
    a.version_id return_value
    from cn_pl_version a,
    cn_pl_std_peplanung b
    WHERE a.version_ID = b.version_id AND
    b.pe_id = '&P6_HELP_PRODET.'
    order by a.version_id desc
    My problem is that when I click on a record I always get the report filled with the oldest version of the current record, so I always have to choose the newest version in the select list manually. I would prefer always to have the newest version in the report.
    The query for the report is as follows:
    select
    (select sum(stunden) from cn_pl_std_peplanung t02
    where abt_id = '10'
    and t02.pe_id = t1.pe_id
    and t02.version_id = t1.version_id
    and t02.idee_id = t1.idee_id) stunden_ir,
    (select name from cn_pl_version u01
    where u01.version_id = t1.version_id) Version
    from cn_pl_std_peplanung t1, cn_pl_projektelemente z1, cn_pl_version u1, cn_pl_projektidee s1
    where t1.version_id = '&P6_VERSION_WAHL.'
    and t1.pe_id = z1.pe_id
    and z1.pe_id='&P6_HELP_PRODET.'
    group by t1.pe_id, t1.version_id, t1.idee_id
    '&P6_VERSION_WAHL.' is the item of the select list
    '&P6_HELP_PRODET.' is the ID of the current record
    I'm not sure if you understood my problem, my english isn't the best...
    Thanks for any kind of help!!
    Patrick

    Hi Patrick,
    what value does you select list show, when you branch to the page? Is it the correct one?
    If not you should change your select list, that the correct version is selected as default. You can define a "default value" when you set the source of the element.
    Otherwise you can maybe set up an example application at http://apex.oracle.com.
    Best Regards
    chrissy

  • Dynamic select list with one static 'not_listed" option

    Hi guys,
    I want to create a dynamic select list with one static 'not_listed' option.
    One possible alternative is to add the 'not_listed' record into database, but I really dont want to go that way unless there is no other way around.
    Can anyone shed some lights on this?
    Many thanks,
    William

    As usual : "It depends"...
    If you have a foreign key defined on that field, Scott's reply won't work - unless you define '0 - Not listed' in the database. You can use selec 'not listed' d, to_number(null) r from dual though...
    Another - more declarative way - is in the on 'Edit Page Item' page, in the 'List of Values' region set 'Display Null' to 'Yes' and 'Null Display Value' to ' - Not listed - '.
    Roel

  • How to make dynamic select list with time interval of 15 minutes

    Dear all,
    I've a question. I need a select list that contains time with intervals of 15 minutes from 08:00 till 16:00.
    example 8:00
    8:15
    8:30
    8:45
    9:00
    9:15
    and so on till 16:00
    The values or stored in a varchar column.
    Can someone please help me with this one?
    Best regards,
    Caroline

    I think the easiest way would be to create a table "INTERVALS" with one row and column "INT_PERIOD"? per 15 minute period description
    8:00
    8:15
    16:00
    Then create your select list item based on a Dynamic List, or Query as
    SELECT int_period d, int_period r
    FROM INTERVALS
    ORDER BY INT_PERIODYou could write something to load the table, but that might take about as long to just edit in the values.
    Making it a Dynamic LOV, you then have it available anywhere else you might need it.
    Edited by: Bob37 on May 4, 2012 8:57 AM

  • Dynamic Select List Allowed Values

    Howdy Folks,
    I am trying to allow end users to select their username. The usernames are generated from a rule library, and displayed in a select form element. I am doing this by having the allowedValues call the rule that generates the possible names directly. The rule returns a list of valid names. The problem I am currently having, is that if the page reloads or refreshes, then the allowedValues calls the rule again. Some of the username choices involve random numbers, so it is possible (and very likely), that separate calls to the rule will generate different potential values. So what is now happening, is that when a user selects the value, the page reloads, and the end user sees an error that looks like this:
    ( ) - Warning: Selected value for field 'Select a Valid User Name' does not match any of the allowed values.
    The reason I am reloading the page, is that I am also trying to show the user what their email address will look like with the new value. So I have a different form element that is loading is value dynamically, and referencing the select form element. This mostly works, but the warning above is unacceptable.
    Is there a way I can load the dynamically created list only once, the first time the form is viewed, and not load it again every time the page refreshes?
    Another thing I tried to do (but didn't have luck with, so I sorta gave up on it) was to use the onChange of the select to change the value of email display field. This way the page never reloads and I don't have to deal with that issue. I'm thinking the onChange might actually work, but I would need to execute javascript or something, and not just use an express <set/> command to set the value of the field name that displays the email text.
    Does anyone have advice on how to make the values only load once? Or how to change the value on the onChange event?
    Thanks!
    Jim

    Mike,
    Thanks for the feedback. I actually did try that eventually. I created a variable in the form, and initialized that variable to the list of possible values. Then I referenced the variable in the 'allowedValues' of the select form item. At that point in time I still had the select box set as an action, so it would reload the page, hoping to reload the value in the email display field. This still did not work. Each time the action fired off, the variable was re-initializing itself. I eventually tried to put in a check, so it would not re-initialize itself if it had already been initialized. That caused a syslog error.
    I ended up solving the problem using javascript. I changed the field that reported the potential email address to an html element. Then for the html attribute I made a div with an ID. I then set a line of javascript into the onChange attribute of the select form element. This worked when ever the select form value changed. I then added the same line of javascript to the onLoad attribute of the jsp pages body element. This worked for loading the page.
    This solved the problem of the page reloading and the select getting new values. That still happens if you actually reload the page, but all the form elements work without the reload now.
    Thanks!
    Jim

  • Hierarchical dynamic select list display

    SELECT LPAD(' ',5*(LEVEL-1))||TO_CHAR(entry_text) display_val,
    entry_target return_val
    FROM apex_application_list_entries
    WHERE application_id = :APP_ID
    AND list_name = :LIST_NAME
    START WITH list_entry_parent_id IS NULL
    CONNECT BY PRIOR list_entry_id = list_entry_parent_id
    On the above query can i make parents as read only and children as items which can be selected in select list..i am taking values dynamically....

    SELECT LPAD(' ',5*(LEVEL-1))||TO_CHAR(entry_text) display_val,
    entry_target return_val
    FROM apex_application_list_entries
    WHERE application_id = :APP_ID
    AND list_name = :LIST_NAME
    START WITH list_entry_parent_id IS NULL
    CONNECT BY PRIOR list_entry_id = list_entry_parent_id
    On the above query can i make parents as read only and children as items which can be selected in select list..i am taking values dynamically....

  • Dynamic Select List not displaying correct value

    Hi there!
    I have a page with a dynamic repeat region.
    As I press one record I get up all the details based on id on an edit page.
    The problem is that the info that is inserted via a Select List is not displaying correct on edit page.
    All the other values are correct, also the values in the repeat region on index page,
    but the value from the Select List on edit page is just displaying the initially selected item.
    Have tried using SELECT DISTINCT in the SQL statement, but no luck.
    Any other ideas?
    Cut and paste from form:
    <select name="Vegtype" class="ProvDet" id="Vegtype" title="<%=(rsAs.Fields.Item("VegType").Value)%>">
                        <option value="Ev" selected="selected">Ev</option>
                        <option value="Fv">Fv</option>
                        <option value="Rv">Rv</option>
                        <option value="Kv">Kv</option>
                      </select>
    Recordset
    <%
    Dim rsAs
    Dim rsAs_cmd
    Dim rsAs_numRows
    Set rsAs_cmd = Server.CreateObject ("ADODB.Command")
    rsAs_cmd.ActiveConnection = MM_LabCon_STRING
    rsAs_cmd.CommandText = "SELECT DISTINCT DatoM, DatoR, DatoU, Distr, FagFelt, Felt, IntNr, Km, KontrNr, Kontrollor, Masse, MasseBK, Punkt, Resept, TestID, UserID, VegHp, VegNavn, VegNr, VegType FROM tblTest WHERE TestID = ?"
    rsAs_cmd.Prepared = true
    rsAs_cmd.Parameters.Append rsAs_cmd.CreateParameter("param1", 5, 1, -1, rsAs__MMColParam) ' adDouble
    Set rsAs = rsAs_cmd.Execute
    rsAs_numRows = 0
    %>
    Regards,
    Christian
    DWCS5 | .Asp | MS Access

    Ok, here goes the top down approach...
    In the HTML header of my page, i have this reference to a js file containing the javascript - <script src="#WORKSPACE_IMAGES#108.js" type="text/javascript"></script>
    Then in an HTML Region I have the following code to create the divs that will be shown and hidden - <div id="divREGION" class="divs">Select region to get list of countries.</div>
    <div id="divCOUNTRY" class="divs">Select country to get list of cities.</div>
    <div id="divCITY" class="divs">Select city and then press "Get Employees". </div>
    Note that these divs contain static content. You may be able to create dynamic content for these divs by creating dynamic query regions and putting div tags around the region (i havent tried this, it may require template modification).
    The select boxes have this code in the "HTML form elements attributes" - onFocus="javascript:showHideDiv(this,true)" onBlur="javascript:showHideDiv(this,false)"
    This onFocus and onBlur call the showHideDiv() function, passing in the object reference of the select box and a true/false to show/hide the related div.
    The actual javascript function that is contained in the 108.js file is:
    function showHideDiv(objThis, inBool){
         var divid = "div" + objThis.id.substring(3);
         if (inBool) {
         ShowDiv(divid);
         else {
    HideDiv(divid);
    That function in turn calls either the ShowDiv() or HideDiv() functions, depending on the true or false, passing in the ID of the div to be changed...
    function ShowDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "inline"');
    function HideDiv(divid){
         eval('document.all'+ '["' + divid + '"]' + '.style' +'.display = "none"');
    Hope this helps.

Maybe you are looking for

  • .au sound format is not working

    Hello everybody, Infact this Alarm.java (attached) using sun proprietary API sun.audio classes, now these are deprecated so i want to replace it with java se 6 classes. This Alarm.java is beeping the PC but not able to run alarm.au audio file and giv

  • Make drop down list on ODC

    hello all how can i make drop down list on commit profile in ODC as drop down list on profile in content server

  • Index not usable in my simple query

    Hi, I have created index for INC_ID coloumn but when I use it in queries, it is not working. Verified the index it is on valid stat only, eventhough its not using in queries. can you please suggest why it is not using. what I have to do for this. I a

  • Account Dr/Cr

    Hi gurus the misc account at the end of the period only show one leg of the journal when we run the account analysis report,the journal is Cash 01.00.00.000.60628.000.000 45.00(cr)asset Miscellaneous Cash 01.00.00.000.60627.000.000 45.00(dr)liability

  • Group by value

    Hi All, I am looking into a query that I find difficult to output the desire data set. Working on Oracle 10g. Table data ID     TYPE            ATRB 1     24          Y 1     25          Y 2     19          N 2     18          N 3     43          N 3