Dependent Select

Hi
I am trying to get a dependent select where the default
values are from a database. I can get it to create a list of
records in the first drop down which when selected changes the
values in the second drop down. This is then posted to a database
which all works fine.
However, when I view the page again, I need the dropdowns to
show the values posted to the database for that record.
Any help would be gratefully accepted.

"DaveZH" <[email protected]> wrote in
message
news:gneqd0$m8v$[email protected]..
> I am trying to get a dependent select where the default
values are from a
> database. I can get it to create a list of records in
the first drop down
> which when selected changes the values in the second
drop down. This is
> then
> posted to a database which all works fine.
>
> However, when I view the page again, I need the
dropdowns to show the
> values
> posted to the database for that record.
>
> Any help would be gratefully accepted.
I wrote a dedicated widget for that. You can find it here:
http://www.massimocorner.com/libraries/spry/linkedselect/
You can use the "tmt:defaultselected" attribute for that.
Hope it may help
Massimo Foti, web-programmer for hire
Tools for ColdFusion, JavaScript and Dreamweaver:
http://www.massimocorner.com

Similar Messages

  • Problem while creating row with dependent select one choice in adf  table

    Iam having independent and dependent select one choice in a ROW in adf af:table
    unable to insert more than one row with dependent select one choice using create insert in adf table.
    Able to add more rows in UI af:table but ,ignoring previous rows (select one choice values) and only latest current row values is getting inserted to the database.
    Following is the code used to create row and for pointing to the current row
    public void addRowOnSecSettings(){
    SecurityGroupSettingsVOImpl SecGroupSetVO =(SecurityGroupSettingsVOImpl) this.getSecurityGroupSettingsVO1();
    try{
    int rowCount = SecGroupSetVO.getRowCount();
    SecurityGroupSettingsVORowImpl SecGroupSetRow =
    (SecurityGroupSettingsVORowImpl)SecGroupSetVO.createRow();
    SecGroupSetRow.setNewRowState(Row.STATUS_INITIALIZED);
    SecGroupSetVO.insertRowAtRangeIndex(rowCount, SecGroupSetRow);
    SecGroupSetVO.setCurrentRowAtRangeIndex(rowCount);
    SecGroupSetVO.setCurrentRow(SecGroupSetRow);
    } catch (Exception e) {
    e.printStackTrace();
    Regards,
    Bhagavan

    as it is dependent select one choice ,have already put auto submit="true".but no chance ,
    if i add two rows vo rowiterator showing count 2 but only current row select onechoice values are getting where as previous row select one choice values are null.

  • Loading multiple dependent select lists

    What is the best way to load select lists that are dependent on the previous one?
    ex.
    Select School
    based on school you select the subjects
    select subject
    based on subject you select the courses,
    etc
    I'm trying to stay away from as much javascript as possible.
    thanks for the help!
    Michael

    You can use javascript, or resubmit the page and laod the dependant select list based on what was selected.

  • Embarrassing questions.. :/  Dependent Select Lists

    One more embarrassing question to feature my narrow knowledge.
    I want to create dependent select lists. Have tried following the procedure as in help:
    <p>You can have one LOV drive another LOV by: </p>
    <ul>
    <li type="disc">
    <p>Creating a basic form. </p>
    </li>
    <li type="disc">
    <p>Defining two lists of values. Note that the driving LOV must submit the page after a value is chosen. </p>
    </li>
    <li type="disc">
    <p>Defining a branch that branches back to the current page. </p>
    </li>
    </ul>
    <p>Consider the following example. The first LOV enables the user to pick a state. </p>
    <pre xml:space="preserve">SELECT state_name d, state_id v FROM states </pre>
    <p>The second LOV selects the country name and country ID based on the state selected in the first LOV. </p>
    <pre xml:space="preserve">SELECT county_name d, county_id v FROM counties WHERE state_id = :Px_STATE_ID </pre>
    I try to follow the procedure and I get nothing in list two.
    I am trying to make it this way that if a country selected in 1st list then only regions to that country get listed in 2nd select list.
    Can someone "spell" this out for me? With an example? I had previously asked similar question here and never figured out solution out of it, so I am embarrasingly asking once more...
    Hrefna the persistent

    Hi Earl,
    Can you please help me out? Hope so.
    I then created a page with a text field called
    P1_EMPNO.You're not using select list items on the page? That's what this thread is about - although the specifics can be adapted to other page item types.
    I added onblur="get_AJAX_SELECT_XML(this,'P1_ENAME')"
    in the Form Element Attributes.
    My question is, how do I create P1_ENAME? Is it a
    LOV, text, etc.Don't know. What are you trying to accomplish? I thought you wanted one select list item to help you narrow down the number of items in a second select list - but it sounds like you've got something else going on. Please explain exactly what your UI requirements are.
    Earl

  • How to create dependent Select Lists?

    Hi,
    Found in the documentation that to create dependent select list we have to do these 3 things:
    1. In the parent select list, choose the option "select list with submit".
    2. Defining a branch that branches back to the current page.
    3. In the child select list sql, use the value of the parent (eg. :P6_PARENT_SELECT_VALUE).
    When I change the value of parent select list the page is getting submitted and its going to the parent page. I've a branch that goes to the parent page but how to create a branch that comes back to the same page and then use it in parent select list?
    Thanks,
    Hozy

    Hi Hozy,
    1. Make the branch conditional...
    2. Create a new branch while will run when you make a selection in parent select list.
    Also check this site to create dependent select list without sumbitting the page....
    http://www.dba-oracle.com/t_html_db_apex_ajax_application_express.htm
    Regards,
    Shijesh

  • AJAX dependent Select lists

    Can anyone please help me figure out where am going wrong?
    I have 2 regions on page 1. Region 1 is supposed to have 2 drop down lists (cascading i.e values in second drop down Drop List HJ are dependent on value selected in first lov Ajax Select HJ). Region 2 will be a report.
    I am trying to create AJAX cascading lovs based on eg. provided on carl's application so that Region 2 is not refreshed each time I select a value from the drop down's
    [http://apex.oracle.com/pls/apex/f?p=36391:37:1510004986327720::NO:RP::]
    I have downloaded the application and tried to do the exact same steps, but my child lov is not updating its values after I select a value from in Ajax Select HJ.
    My application is available at http://apex.oracle.com/pls/apex/f?p=33829:1:2010637670427735:::::
    Appreciate any help on this
    Thank you
    Deepu

    Thank you Denes !! The example really helped me. Now I am stuck at the next level. I am new to apex and learning and building dashboard for my organization. So, please bear with me.
    I have a page that is divided into 4 regions. Each region displays a chart that is generated dynamically. When I say dynamic, each region has 2 drop down lists.
    First pull down has Org and Year as values, if they wish to view chart by Org or Year. If they choose Org, second drop down defaults to Org. If they choose Year, second drop down displays Year's as 2010, 2009,2008 so on. Depending on which year they choose they should be able to view that Year's chart by month in that region.
    Initially I had used select lists with submit for drop down's but that was refreshing the whole page. But now after using your example with AJAX I was able to accomplish the cascading Lov's stuff. Now, after user selects a value in second drop down, is there a way that I can display the chart and refresh only that region each time user selects a value from the drop down.
    I want to avoid refreshing the page each time, I need each region to refresh based on user selection in drop down's. Is this possible in apex? Is there any example that you could direct me to.
    Thank you so much for all your inputs. Appreciate it very much
    Deepu

  • Dynamically populating values in 2 dependent select in jsp

    hello users
    i am confronted with a probelm.
    i am having 2 select fields that are dependant on each other. i.e. select one and in the other select, values are automatically populated..
    the only problem here is that it has to be dynamically done
    i dunno javascript can do it dynamic ally but by hardquoting values, it can be done.(which obviously i dont want)
    i can't solve it by using arraylist or vector either. it may be i'm not using the correct method. but aneways, plz reply me asap
    thanks a lot in advance
    Rajeev

    hello sure
    thanx for taking the time to reply...i can email u my files there are 2 jsp files and 1 bean file ...u'll have to arrange them in a package (bean) under the folder WEB-INF if you are using tomcat..
    give me ur email id , i'll mail u the code in a zip format
    thanks once again
    Rajeev

  • Creating dependent select list menus with javascript

    Hi Everybody,
    I m creating parent and child select list menu. Value of Child menu would be dependent on the value selected in the parent menu. I have tried to implement a code from adobe labs  (http://kb2.adobe.com/cps/149/tn_14924.html) but many strange javascript errors are coming up.
    My code is given below:
    <?php require_once('../Connections/connection.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    mysql_select_db($database_connection, $connection);
    $query_sector = "SELECT * FROM sector WHERE media_code = 100 ORDER BY sector_desc ASC";
    $sector = mysql_query($query_sector, $connection) or die(mysql_error());
    $row_sector = mysql_fetch_assoc($sector);
    $totalRows_sector = mysql_num_rows($sector);
    mysql_select_db($database_connection, $connection);
    $query_rsList2 = "SELECT subsector_code, subsector_desc, sector_code FROM sub_sector ORDER BY sector_code ASC";
    $rsList2 = mysql_query($query_rsList2, $connection) or die(mysql_error());
    $row_rsList2 = mysql_fetch_assoc($rsList2);
    $totalRows_rsList2 = mysql_num_rows($rsList2);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <!-- Dynamic Dependent List box Code for *** JavaScript *** Server Model //-->
    <script >
    <!--
    var arrDynaList = new Array();
    var arrDL1 = new Array();
    arrDL1[1] = "selList1";              
    // Name of parent list box
    arrDL1[2] = "form1";                 
    // Name of form containing parent list box
    arrDL1[3] = "selList2";              
    // Name of child list box
    arrDL1[4] = "form2";                 
    // Name of form containing child list box
    arrDL1[5] = arrDynaList;
    <%
    var txtDynaListRelation, txtDynaListLabel, txtDynaListValue, oDynaListRS; txtDynaListRelation = "sector_code";
    // Name of recordset field relating to parent
    txtDynaListLabel = "subsector_desc";
    // Name of recordset field for child Item Label
    txtDynaListValue = "subsector_code";
    // Name of recordset field for child Value
    oDynaListRS = rsList2;
    // Name of child list box recordset
    var varDynaList = -1;
    var varMaxWidth = "1";
    var varCheckGroup = oDynaListRS.Fields.Item(txtDynaListRelation).Value; 
    var varCheckLength = 0;
    var varMaxLength = 0;
    while (!oDynaListRS.EOF){
    if (varCheckGroup != oDynaListRS.Fields.Item(txtDynaListRelation).Value) {
        varMaxLength = Math.max(varCheckLength, varMaxLength) varCheckLength = 0; }
        %>
        arrDynaList[<%=(varDynaList+1)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListRelation).Value)%>";
        arrDynaList[<%=(varDynaList+2)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListLabel).Value)%>";
        arrDynaList[<%=(varDynaList+3)%>] = "<%=(oDynaListRS.Fields.Item(txtDynaListValue).Value)%>";
        <%
        if (oDynaListRS.Fields.Item(txtDynaListLabel).Value.length > varMaxWidth.length) { 
        varMaxWidth = oDynaListRS.Fields.Item(txtDynaListLabel).Value; }
        varCheckLength = varCheckLength + 1; varDynaList = varDynaList + 3;
        oDynaListRS.MoveNext(); }
        varMaxLength = Math.max(varCheckLength, varMaxLength);
        %>
    //--></script>
    <!-- End of object/array definitions, beginning of generic functions -->
    <script >
    <!--
    function setDynaList(arrDL){
    var oList1 = document.forms[arrDL[2]].elements[arrDL[1]];
    var oList2 = document.forms[arrDL[4]].elements[arrDL[3]];
    var arrList = arrDL[5];
    clearDynaList(oList2);
    if (oList1.selectedIndex == -1){
    oList1.selectedIndex = 0; }
    populateDynaList(oList2, oList1[oList1.selectedIndex].value, arrList);
    return true; }
    function clearDynaList(oList){
    for (var i = oList.options.length; i >= 0; i--){
    oList.options[i] = null; }
    oList.selectedIndex = -1; }
    function populateDynaList(oList, nIndex, aArray){
    for (var i = 0; i < aArray.length; i= i + 3){
    if (aArray[i] == nIndex){
    oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
    if (oList.options.length == 0){
    oList.options[oList.options.length] = new Option("[none available]",0); }
    oList.selectedIndex = 0; }
    function MM_callJS(jsStr) { //v2.0
      return eval(jsStr)
    //-->
    </script>
    </head>
    <body onload="MM_callJS('setDynaList(arrDL1)')">
    <form action="#" method="get" name="form1">
    <select name="selList1" onchange="MM_callJS('setDynaList(arrDL1)')">
      <?php
    do { 
    ?>
      <option value="<?php echo $row_sector['sector_code']?>"><?php echo $row_sector['sector_desc']?></option>
      <?php
    } while ($row_sector = mysql_fetch_assoc($sector));
      $rows = mysql_num_rows($sector);
      if($rows > 0) {
          mysql_data_seek($sector, 0);
          $row_sector = mysql_fetch_assoc($sector);
    ?>
    </select>
    </form>
    <form action="#" method="get" name="form2">
    <select name="selList2"></select>
    </form>
    </body>
    </html>
    <?php
    mysql_free_result($sector);
    mysql_free_result($rsList2);
    ?>
    The javascripts errors that I m getting are :
    Syntax error  test.php, line 20 character 1
      'arrDL1' is undefined  test.php, line 74 character 3
      'arrDL1' is undefined  eval code, line 1 character 1
    Note: I have bolded the lines where error is coming up.
    If more info is needed please tell.
    Please Help,
    Thanks in Advance

    You'd probably have to put a copy of the app on apex.oracle.com for a complete diagnosis, but you could maybe just check that the Source Used attribute for teh select list is set to 'Only when current value in session state is null' and not the 'Always' option.
    Regards,
    John.

  • ESS BP-50.4 Benefit Enrollment - Dependant Selections

    Hi - I have installed the ESS BP 50.4 and for benefit enrollment all of the screens that all you to select eligible dependants - the check box shows at the top of the screen when the dependant name shows in a table at the bottom of the screen....how/where do I correct this?
    Thanks - Janet

    Did you ever resolve this issue?  I am experiencing the same issue.

  • Time dependent selection

    Hi,
    Can anybody help me with me problem?
    I'm creating a datasource for a characteristic with time dependent attributes.
    I need to have 0DATEFROM as a selection characteristic in the infopackage.
    But when I do this, the load fails with the next error mesage: " ZEMPLOYEE : Data record 1 ('01000001 ') : Invalid "from" date '00000000 '". And the same error appears for all values of ZEMPLOYEE.
    Does anybody how to solve the problem?

    Hi Elena,
    Do you load master or transactional data?
    If the latter, you need to load master data of 0EMPLOYEE first. The date supplied by the system you need to use in TO_DATE field. The system will take care about creating time-dependent records.
    See some examples here:
    Re: Master Data: 2 records with different FROM-TO dates
    Re: Master data load failure
    Re: Loading Multiple Time-Dependent Characteristics for an InfoObject
    Best regards,
    Eugene

  • "No data to retreive" depending selection but there are data

    Hi folks,
    It's happening something really weird in a webi we have built.
    We have a webi report built on a query bex - olap connection.  In the query we have a variable which is 0PLANT, it's a hierarchy variable; in the webi itself we have specified the rest of variables, amongst then Document Date (0DOC_DATE).
    If we run the report choosing different values just in 0PLANT and 0DOC_DATE variables, webi shows data... sometimes!
    Case 1)
    0PLANT = the top hierarchy node
    0DOC_DATE = 01.10.2013 - 31.12.2013
    Data -> ok
    Case 2)
    0PLANT = the top hierarchy node
    0DOC_DATE = 01.01.2013 - 31.12.2013
    No data to retrieve, which is a nonsense because at least there are date for the last 3 months
    Case 3)
    0PLANT = a minor hierarchy node
    0DOC_DATE = 01.01.2013 - 31.12.2013
    Data -> ok
    As you see, sometimes reports shows a message saying "No data to retreive" but there are data.
    We are thinking when we make a huge selection, as webi would show a huge amount of rows, instead of giving a "time-out" or another error, is saying that "no data to retreive".
    What do you think?
    Thanks

    Hi,
    After having done lots of executions and tests, we think we have found the possible explanation. It turns out that this report has a lot of dimensions (around 30) as "free dimensions", I mean, not shown directly in the report, but possible to include them once run.
    It seems that when a webi is executed, BO looks for all data, independently it's or not in the default view. We have removed all dimensions, remaining just those which are really needed, and webi worked!
    It looks like it was a kind of time-out error.
    Extrange.
    BYT Koen; case1 is january, and case2 is october (I should have put a more visible example lol)
    Thanks

  • ADF Dependent select one choice list

    hi all
    i have two lists in my page, and the second one takes value from the first, but it is not working, the second list is empty always whatever i select in the first one.
    i have searched many threads and it is not working. i also did the steps in the page http://www.oracle.com/technology/obe/obe11jdev/11/adfbc_new_features/adfbc.html#t2
    this what i have did in details:
    first list : LevelComboVO
    select distinct group_level from mrcps_group_link
    second list: GroupComboVO
    select large_group_seq, group_level, symbol
    from mrcps_group_link
    where group_level = :selectedLevel
    then i made a bind variable for the second list GroupComboVO named selectedLevel
    for the first list LevelComboVO i made the following:
    press plus on the ListOfValues:GroupLevel and for the list data source i have made new one for GroupComboVO and choosen the list attribute groupLevel and for ui hent i chosed groupLevel
    then i have tested the AM but no data returned for GroupComboVO
    please help

    first i have done the 2 view objects and the corresponding two select one choice list
    for the first list i have made a managed bean for valueChangedListener -- > #{GrouplLevelBean.passLevel}
    and i have put code as you told me :
    package mrcps.view;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import oracle.adf.model.binding.DCBindingContainer;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.jbo.ViewObject;
    public class GrouplLevelBean {
    public GrouplLevelBean() {
    public void passLevel(ValueChangeEvent valueChangeEvent) {
    // Add event code here...
    DCIteratorBinding testListIter1 = getItrtBindings("GroupComboVOObj1Iterator");
    ViewObject vo1 = testListIter1.getViewObject();
    vo1.setNamedWhereClauseParam("selectedLevel", valueChangeEvent);
    vo1.executeQuery();
    getItrtBindings( is giving me a red underline indication that method not found
    Edited by: user604057 on Apr 3, 2009 3:27 PM

  • Dependent Select Lists

    i am not able to do this
    I have two fields
    one item is select list with value as Month/Year
    another item is not edit-able one ,
    but the value should be populated based on the selection in the previos item
    if item1 value is ='Month'
    populate item2 as Yes
    else item1 value is ='Quarter'
    populate item2 as No
    iam very new to this,
    please help me step by step procedure,
    thanks

    Hello,
    There is a couple different ways to do this here is a link to one way
    How to make LOV's reference other LOV's on the form page
    and here is a link to another way
    http://forums.oracle.com/forums/thread.jspa?threadID=260481
    If neither of these work for you just do a search for select list in the forum and you'll get quite a few hits.
    Carl

  • How to do dependent select list based on parent select list

    Hello... I have the following bit of code...
    *parent select
    htmldb_item.select_list_from_query(1,null,'select program_desc_eng, program_id from myfps_programs')
    * child select using parent value
    htmldb_item.select_list_from_query(2,null,'select sub_pgm_desc_eng, sub_program_id from myfps_sub_programs where program_id = <VALUE FROM ABOVE?>')
    I know this is easily done using the select list form items and such but I need to use the htmldb_item function. On screen when a user selects value from the parent select list, I want the child select list to use the value of the parent as a parameter into its own select list. How can I reference the parent? (ie can I use htmldb_application.g_f01(1) or something of this nature?) I realize I may need a bit of javascript to have it work correctly but I'm just wondering if its possible?

    This is not a trivial task.
    See http://forums.oracle.com/forums/thread.jspa?messageID=1241356

  • Dependent Select Boxes Driven from Web Services

    Here's a little tutorial that I put together that demonstrates a technique whereby a user makes a selection from a select box, triggering a web service invocation which in turn populates a second select box:
    http://figleaf.mmalliance.acrobat.com/p19377307/
    Enjoy!

    Here's a little tutorial that I put together that demonstrates a technique whereby a user makes a selection from a select box, triggering a web service invocation which in turn populates a second select box:
    http://figleaf.mmalliance.acrobat.com/p19377307/
    Enjoy!

Maybe you are looking for

  • !!NOKIA MAKE A NEW FIRMWARE FOR N82!! 35.0.002 is ...

    I BUYED THIS PHONE(N82) TO USED...NOT TO WATCH AT HIM....TO MAKE A PICTURE DOESNT WORK...VIDEO NO.....MUSYC PLAYER IS BLOCKING...A NEW BUG AT BAR CODES READER!!!!i am tired to ask for help on this forum.........nothing solved......i dont know what to

  • I do not get prompted to authorize my Nook

    I have read several threads advising me to delete adobe reader through the device and through the terminal, all of which I have done successfully. However, when I relaunch Adobe I do not receive a prompt to authorize my Nook. I am really frustrated a

  • Video as alarm tone

    Can I use a video clip as alarm tone in iPhone 5 ?

  • BHOLD FIM Integration Fails on Database Configuration

    Gentlemen, I hope you are familiar with BHOLD FIM Integration because i'm having a headache trying to install it. FIM Service installed successful and so BHOLD Core. However, when i tried to install BHOLD FIM Integration and logged the error and can

  • Set document root for Tomcat

    Hello I want Tomcat to use another document root (where index.html typically resides in). I set <Host name="localhost" debug="0" appBase="" docBase="d:\WWW" unpackWARs="true"> but I got error MAPPING configuration error for request URI Unfortunately,