Adf drop down list in adf  table

hi all
i m trying to create a data table that have a column on it as drop down list ,the list get the value good as bind variable passed to it and work good when create a new record but when i try to update the record
always get this error
<Utils><buildFacesMessage> ADF: Adding the following JSF error message: java.lang.ArrayIndexOutOfBoundsException
oracle.jbo.JboException: JBO-29000: java.lang.ArrayIndexOutOfBoundsException
and when i try to print the value of the list it print the index not the value
when i change it(the drop down list) to lis of value LOV it didnt git any record in the LOV
my code is :
<af:column headerText="#{bindings.DeptLabView3.hints.CntPc.label}"
id="c4">
<af:selectOneChoice value="#{row.bindings.CntPc.inputValue}"
label="#{row.bindings.CntPc.label}"
required="#{bindings.DeptLabView3.hints.CntPc.mandatory}"
shortDesc="#{bindings.DeptLabView3.hints.CntPc.tooltip}"
id="soc3">
<f:selectItems value="#{row.bindings.CntPc.items}"
id="si4"/>
</af:selectOneChoice>
</af:column>
please any one help
Edited by: user554540 on 20/02/2010 08:50 ص

Hi,
I would like to use selectOneChoice in af:table, but i've got error: "java.lang.ArrayIndexOutOfBoundsException, msg=0"
Can u send me an example for using selectOneChoice in af:table?
Thanks,
J.
<af:column headerText="#{bindings.viewTsheets1.hints.ProjectId.label}"
id="c8">
<af:selectOneChoice value="#{row.bindings.ProjectId.inputValue}"
label="#{row.bindings.ProjectId.label}"
required="#{bindings.viewTsheets1.hints.ProjectId.mandatory}"
shortDesc="#{bindings.viewTsheets1.hints.ProjectId.tooltip}"
id="soc2">
<f:selectItems value="#{row.bindings.ProjectId.items}"
id="si2"/>
</af:selectOneChoice>
</af:column>
-----------------------------------------------------------------------------------------------------------------------------------------------------------

Similar Messages

  • Drop Down List in a table - different options for each row

    How can i have a drop down list in a table with different options for each row?
    My requirement is this.. I want to display, say employee dtails in a table, and one column is employee hobbies, whcih can have multiple values and each employee may have a different list of hobbies. So how can we populate the drop down for each row, with different options?

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • How to show "ALL" Values by default in Page Drop-Down Lists in Pivot Tables

    Hi Everyone,
    Iam stuck with 1 problem please can any 1 help me if u know the solution.
    Here is my problem:
    How to show "ALL" Values by default in Page Drop-Down Lists in Oracle BI Pivot Tables?
    For example, if you place Region in the pages area, a Region drop-down list allows the user to select a particular region, and see the data for only that region, rather than seeing all the Regions,But by default its not showing "ALL" option in the drop down list ,rather than doing that its showing result for only 1 region by default.
    And an other problem with this pages area is, if we palce the multiple attributes in the Pages area in the pivot table, the (Fields)result is showing in vertically, the attributes 1 by 1(Every attribute in a new line) ,rather than showing like that, is there any way to show the results in horizantally?(We want to have it as a seperate drop drown list for every field horizantally not as a concatenated list).

    Thanks Nikhil. But I am fetching the values from the LOVCache.java.
    I am using <af:selectManyChoice>. Is there any way I can use LOVCache.java value for selecting default values instead of hard coding?
    I mean to say can I write
    unselectedLabel="#{LOVCache.entityTypeSelectionList.anyValue}"
    where LOVCache.entityTypeSelectionList is used to populate the drop down box.
    Regards,
    Aseet

  • Dynamic Drop-Down list in a table row or subform

    Hi,
    I need to display multiple drop-down list elements dynamically. Each of these DDLs will have different values.
    For example:
    The table will have 2 columns (Student Name text field and Courses drop-down)
    Row 1: Student 1 & Courses of Student1 in DDL
    Row 2: Student 2 & Courses of Student2 in DDL
    When I execute my app, both the drop-downs (i.e. for both the students) are displaying all the courses of all the students. I tried a lot with binding options..
    $record.Students[].Courses[]
    is refering to all elements of the node. If I use the index 0 for Students node, I am getting 1st element rows.. if I use 1, I am getting 2nd element rows,,,
    But How can I set the binding so that Row 1 has only Student 1 courses and Row 2 has Student 2 courses?
    IS THERE A WAY TO DYNAMICALLY SET THE BINDING USING JAVASCRIPT?
    I tried with tables, subforms.. it is not working. It is working fine in plain web dynpro table but not in an interactive form. I am using NW 2004s SP11, Web Dynpro Java. LiveCycle Designer 7.1, Adobe Reader 7.09.
    There are some other posts talking about similar issue.. I tried the solutions mentioned there as well, but nothing worked.
    I would really appreciate if any one can provide a solution or pointer to my problem.
    Thanks
    Ram

    Hey. Uh, this probably isn't the answer you were looking for, but it sounds like you've got a problem with your database design there. Generally speaking, your tables shouldn't have multi-valued fields, in the relational model anyway (sql). Instead, you should look at adding a separate table like EMPLOYEE_HOBBIES. Then you have a foreign key using the employees primary key as the foreign key in the employee_hobbies table, see what I mean? I might have misunderstood your explanation though, I'm not sure.
    Alternatively, you could just have hobbies as a big freeform varchar field, and don't bother to make people separate their hobbies into different fields (you'd have to abandon the drop-down listbox idea in this case). If there's no really important reason to make the distinction, then it's probably easier just to not do it.

  • Adding Drop Down List values from table fields

    Hi all,
    Recently we have switched from Microsoft's Infopath to Adobe's LiveCycle Designer.  In InfoPath i was able to allow a user to enter data in a table and then use that data as values for a drop downlist, which could in turn be used in another table.  Infopath made it relatively easy to do this, but I assume it requires scripting in LiveCycle.  Here is an example that make make it easier to to explain:
    Let's say we have a form with a table that has a colomn where the user can enter a value in a table let's say "Computer Name":
    Computer Name | IP | Vendor | Serial Number|
    PC 1
    ---------------------| 192.168.2.34| HP | US4839494
    PC 2
    PC 3
    PC 4
    Further down the form there is a nother table with a drop down list.  I want the values of the drop down list to be what ever values were entered for "Computer Name" in the previous table.  So in this case the table would look like this:
    Computer Name | Acquisition Date| End of Life Date
    <Drop DownList>|  07/21/2010 | 07/21/2014
    The drop downlist values would be "PC1, PC2, PC3, PC4"  or whatever values were entered in the previous table.  Essentially, I am trying to avoid from having users type in "Computer Name" data every time the "Computer Name" needs to be entered.  It would be so much easier to enter all "Computer Name" values and then use those values as part of a drop down list to avoid excessive typing.
    I hope this makes sense, it is fairly easy to do in InfoPath and I am sure there is a way to do this in LiveCycle.
    Let me know if my explanation is not clear enough.
    Thanks!

    Thanks for the feedback, but it doesn't seem to quite accomplish what I am trying to do. I've tried using global binding as you specified, but the outcome is not exactly what I want.  Perhaps this drawing can help depict what I am trying to do:
    http://imageshack.us/photo/my-images/153/dropdownlist.png/
    On the picture I manually defined the values for the drop down list.  Again, I want these values to be taken from "Computer Name" in the table above.
    Thanks!

  • Beginner Problems - How to sum drop down lists in a table

    Hi,
    Please forgive my newness but I'm creating a table with 10+ rows and columns and need to sum the colums. The user is expected to select a number from a drop down list and I would like to sum those nbumbers up at the bottom of the column, seems simple enough...
    I have named each cell in the bindings tab but can't seem to find the right sum script. I just started using livecycle and have had a good experience up until now.
    I wish it was like excel where you just need to click or highlight the cells you want to sum and be done with it but I can't seem to find the easy button...
    Cant you just highlight a column, name it and then use that name in a sum script?
    Thanks so much for any help and I've looked around but can't get a grip on this one so I apologize if it's been asked before.
    Go easy on me.

    One last thing.
    I can manage this one on my own but it's taking so long to do it the way I'm going at it.
    Basically, I've overpopulated most of my drop down list items, some by over 100 and I'd like to restrict the results that can be chosen by the user.
    Right now, I'm deleting each value in the List Item field in the cell tab one by one but I have a lot more to go and this could take a few hours at this rate. Is there no way for me to just highlight a large chunk and remove it that way or do I have to go one by one clicking the delete button? I can't find any option to delete more than one at a time which seems odd.
    Sorry if I'm not clear enough.
    Thanks again either way.
    ~OK~
    I just ended up copying a new cell to each overpopulated cell and rename. Seems to have worked and definitely saved some time, kind of obvious I suppose... but would be nice to be able to delete more than one item at once in the list item field.

  • Populating drop down list in a table cell-urgent

    Hi all
    I have a problem. I want to populate a dropdown list in a table cell. can anybody tell me the step by step procedure for that.
    I am doing it generally. not using R/3
    I am creating sub node like u have mentioned. I haven't done it using wizard.
    Is there any difference in the way we populate this list?
    My root node is expense. Inside that some value attributes are there. For the drop down list i've created a sub node 'extype'.
    I am getting error.
    it is:
    com.sap.tc.webdynpro.progmodel.context.ContextException: Node(EREmpHomeView.expense.extype): cannot bind or add elements because the node has no valid parent
    Following is the code i've written.
    IPrivateEREmpHomeView.IExtypeElement el;
              IPrivateEREmpHomeView.IExtypeNode nd=wdContext.nodeExpense().nodeExtype();
              el=wdContext.nodeExpense().nodeExtype().createExtypeElement();
              el.setEtype("Travel");
              nd.addElement(el);
    Sill i'm getting the same error
    Hi Nidhideep
    Error has gone with the code that Mr Anil has given. But there is no value in the List. Dropdown list is coming as a blank list.
    Thanks and Regards
    Aparnna
    Message was edited by:
            aparnna prasad

    hi
    Aparna try this code:
    1. Context description at design time:
    Value-Node "myNode", collection type=list, cardinality=0..n, selection=0..n
    and the attribute:
    Value attributes “myValue”, type="String".
    2. The corresponding Java source code example that you create in the wdDoInit method of the controller implementation:
    // The ISimpleTypeModifiable interface enables access to
    //a data type instance that can be modified at runtime:
    ISimpleTypeModifiable myType =
       wdThis.wdGetAPI().getContext.getModifiableTypeOf(“.myNode.myValue”);
    //Sets the label text for this data type.
    myType.setFieldLabel(“New label”)
    //Sets the valid values of this data type. The individual elements are inserted
    //when the put method is called and
    //and the value set is filled with the appropriate
    //key value pair.
    IModifiableSimpleValueSet values =
       getSVService().myType.getModifiableValueSet();
    values.put(“key_1”,”Mister”);
    values.put(“key_2”,”Mistress”);
    values.put(“key_3”,”Miss”);
    Regards
    Nidhideep

  • Is it possible to create interactive drop down lists that reference tables on separate pages of the PDF?

    I am looking to create a user input PDF in which drop down lists are utilized to search tables, however, I am not very familiar with the options that are available or if this is even possible?  Also, is it possible to write a background code that could read user inputted text to run a search or even solve some equation? Can someone let me know if these items are possible and/or let me know what adobe program may be necessary to accomplish these tasks? Thanks!

    PDFs have no concept of "tables" like MS Word or MS Excel has. There is content that looks like a table.
    Acrobat JavaScript does know about arrays and form fields. So one could have an array in JavaScript and fill in a series of fields that looks like a table. One can then use JavaScript to search the table.
    JavaScript in Acrobat can accept user input in fields and pop-up windows.
    It is possible to solve user imputed equations if the proper notation or coding is used.
    D.P. Story is a PDF evangelist that created LaTex for creating PDF with mathematical symbols and he also created the AcroTex product that can be used to create educational tools that includes mathematics including calculus self grading tests.

  • How to grab the value from a drop down list inside a table cell

    Hello,
    My situation is I have a few columns displayed in a table format using repeater tag. Some cells is a dropdown list(<netui:select /> tag). My question is how can I grab the value when user made a selection.
    I believe I can get the row index but I can't use the datasource attribute to get the user selection since it is in a repeater. All the cell use the same datasource and workshop will give "NULL" value when there are more than one tag bind to the same form valiable.
    Any suggestion are very much appreciated! Thanks a lot in advance.
    My snippet code are:
    <netui-data:repeater dataSource="{pageFlow.ownedTask}"><netui-data:repeaterHeader></netui-data:repeaterHeader>
    <tr valign="top">
    <td><netui:select dataSource="{actionForm.userName}" optionsDataSource="{pageFlow.nameList}" onChange="getUser()" ></netui:select>
    </td>
    <td><netui:select dataSource="{actionForm.empDept}" optionsDataSource="{pageFlow.deptList}" onChange="getSelectedDept()" ></netui:select>
    </td>
    <td><netui:label value="{container.item.status}" />
    </td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></netui-data:repeaterFooter>
    </netui-data:repeater>

    1) let drop down box be g_dd.
      if g_dd is initial.
      g_dd = option2.
      endif.
    2)
    by default same pf-status is used by all the screens in the same program
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status 'abc' excluding 'fcode_of_button'
    endif.
    or
    data: git_fcode type sy-ucomm with header line.
    git_fcode = 'fcode_of_button'.
    append git_fcode.
    if sy-dynnr = 'screen_no'. " for screens for which you do not want button to come
    set pf-status excluding git_fcode
    endif.
    Edited by: Amit Gupta on Oct 11, 2008 11:36 AM

  • Triggering "exit" event of a drop-down list in all instances of a table row

    I have a drop-down list in a table row with multiple instances that performs a calculation on the exit event. This calculation draws information from 2 other dropdown lists contained above in non-repeating rows of the same table.
    The desired behavior is: should the user change their choices above, all instances of the drop-down list below would perform the "Exit" event script  accessing the new values above.
    My script is:
    RowOptionalCoverage.DdlCoverageType.execEvent("exit");     this works, sort of
    It only updates the first instance of RowOptionalCoverage and none of the subsequent instances. The user can "Tab" through the instances and trigger the Exit event for each instance, but this is not a reasonable solution.
    I have tried using the resolveNodes method without success. I understand, using the resolveNodes method may be necessary when referencing multiple instances of an object:
    this.resolveNodes("RowOptionalCoverage[*].DdlCoverageType[*]").execEvent("exit");     doesn't work
    xfa.resolveNodes("RowOptionalCoverage[*].DdlCoverageType[*]").execEvent("exit");      doesn't work
    No doubt, I must be using the resolveNodes incorrectly or missing something? Probably something simple.
    Any advice is greatly appreciated.
    Stephen

    PERFECT!!! Works right out of the box!
    This has opened my eyes to the essential nature of loops. My form is very large and complex and functions correctly, Yet the coding is lacking in sophistication--no loops, functions, fragments or other code efficiencies. I am teaching myself (with the help here) and I have skipped learning and using some techniques when I could things to work using the  limited skill set I have.
    Sometimes, I just don't "get it". After I fail a few times, I skip it and try something else. Functions are a great example. I could utilize a bunch of these if I could only write one that works. It is frustrating. If I got one to work, I know could write a ton of them. But, there is some essential part of functions I am missing that's preventing me from having my first success with them. (I think it has to do with not understanding arguments completely).
    Anyway, I am overjoyed with the solution you provided and I understand it well enough to be able to use again in other situations.
    Thanks again!
    Stephen

  • Get/Set values from a drop down list

    I am trying to modify the http://www.netbeans.org/kb/60/web/web-jpa-part2.html so that instead of entering the data from a text field (in update & add) the values come from a drop down list from a table. I have drop down lists that are populated bothe from the DB and hard coding. When I run, I am able to see the options on the DDs. But none of the CRUD work. I think this is because my set and get for the drop down is wrong. Then again, I also have a few text fields from the original example which also don't seem to work. Here is a piece of my addButton():
            RowKey[] selectedRowKeys = getTableRowGroup1().getSelectedRowKeys();
            PaymentDetails[] pv = getSessionBean1().getPaymentVoucher();
            int rowId = Integer.parseInt(selectedRowKeys[0].getRowId());
            PaymentDetails upPV = pv[rowId];
            bankCodeDD.getSelected();
            statusDD.getSelected(); // hard coded value
          upPV.setPrepBy((String) prepByField.getText());
          PaymentDetailsController pvController = new PaymentDetailsController();
            pvController.addPaymentDetails(upPV);
            addRequest = false;
            return null;How do I set and get the values from the drop down so than it passed to my bean? When I choose a row to be updated, make changes and click Update, I get this message on my Tomcat:
    com.sun.webui.jsf.component.DropDown::The current value of component form1:deptCodeDD does not match any of the selections.
    Did you forget to reset the value after changing the options?Can someone please point me to a place which shows how I can add a default value from my DD? I tried to follow http://www.netbeans.org/kb/55/dropdowncomp.html, but unable to complete because I get an error for Options api. The auto-fix imported import org.apache.jasper.Options; But the package given in the tutorial is com.sun.webui.jsf.model.Option. My Java version is 1.6.0_07.
    private Options listOptions[];
    ...//getter setter goes here
    listOptions = new Option[noofDBRows + 1];Many Thanks!

    I don't guess what I may add.
    The contents of the table named lookup appear on the screenshot.
    cell A1 contains the string One-Piece, cell B1 contains the 'associated' value 160.
    cell A2 contains the string Two-Piece, cell B2 contains the 'associated' value 130.
    cell A3 contains the string Three-Quarter, cell B3 contains the 'associated' value 150.
    Now table Main
    In column B the cells contain a pop_up menu with four items like the ones described by Jerrold.
    In column C of the cells contain the formula :
    =IFERROR(VLOOKUP(B,Tableau 2 :: A:B,2,FALSE),"")
    I enhanced it since yesterdays because I forgot to treat the case when cell is blank in column B.
    I apologize but as I'm using my machine in French, the screenshot display the French formulas.
    I repeat that you may find useful infos in the PDFs files which we may download from the menus:
    Help > Numbers User Guide
    Help > iWork Formulas and Functions User Guide
    As you are in Stoke-on-Trent maybe your system is set to use the comma as decimal separator.
    If it's that, you must replace the comma by semi-colons in the formulas (you may see them in my screenshot).
    Yvan KOENIG (VALLAURIS, France) mercredi 24 mars 2010 09:27:53

  • How to auto populate a field based on drop down list unless specific item is selected

    Hi all,
    Apologies if I have posted this in the wrong area but I am new to Adobe LiveCycle, JavaScript and these forums.
    I am trying to build an Acrobat form using LiveCycle but am having trouble with the drop down lists.
    Inititaly I simply wanted to populate fields in one table based on the selection of a corresponding drop down list in another table.
    I used the following code and it worked fine:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The problem is that now I want the above code to work UNLESS one of the items in the dropdown list is specifically selected in which case I want the text box in the other table to display a message such as "Enter details in the field below".
    I have tried to create an If Else statement using the following code:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*].Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[*].Row4.Cell1"); 
    for (var i=0; i <= fFrom.length-1; i++) {
         if (fFrom.item(i).rawvalue = "Option 3"){
         fTo.item(i).rawValue = "Enter details in the field below";
         else {
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
    The code now populates the field with "Enter the details in the field below" no matter what item I select from the dropdown list.
    Your help is greatly appreciated.
    Cheers,
    ozzy_q

    Follow Up:
    Ok so ive changed things up a bit and have had some more success.
    I have used a Switch statement in my For loop to perform different actions based on the item selected.
    The code looks like this:
    Workbook.Content.Table1.Row3.AppropriationDetails.Row4.Cell1::change - (JavaScript, client)
    var fFrom = xfa.resolveNodes("Workbook.Content.Table1.Row3.AppropriationDetails[*] .Row4.Cell1");
    var fTo = xfa.resolveNodes("Workbook.Content.Table2.Row3.AppropriationDetails[* ].Row4.Cell1");
    for (var i=0; i <= fFrom.length-1; i++) {
         switch (fFrom.item(i).rawValue)
         case "Option 3":
         fTo.item(i).rawValue = "Enter the details in the field below";
         break;
         default:
         fTo.item(i).rawValue = fFrom.item(i).boundItem(xfa.event.newText);
         break;
    This code solves my problem but has thrown up a new issue:
    When i select Option 1 or 2 from the dropdown list  the change in the text field is instantaneous, however if I select Option 3 it wont appear in the text field until I either select Option 3 a second time or select another item. Its as if the text field is a selction behind what I have enterd in the dropdown list.
    Any thoughts?

  • Help with multipule drop down lists in a select query

    Hi I am trying to design a search query using 5 drop down lists coming from tables.  the front end looks like this
    I have the selections going to variables then by $_POST into the msqyl query my other code is
    MY CODE FOR THE FORM IS
      <form action="horse-events-devon.php?url_countyid=<?php echo  urlencode ($url_countyid ['url_countyid'])  ; ?>&go" method="POST">
        <table id="searchtable">
          <tr>
            <th>Find By Discipline</th>
            <th>Find By Venue</th>
            <th>Find By Championship</th>
            <th>Find By Organiser</th>
            <th>Equine Association</th>
            <th>Submit Your Selections</th>
            </tr>
          <tr>
            <td><select name="dis_id">
                                        <?php
                                            $upcomingdis = upcomingdis($url_countyid);
                                            $upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_dis_bycounty ['dis_id']; ?>" >
                                        <?php echo $upcoming_dis_bycounty ['dis_description']; ?></option>
                                        <?php
                                        } while ($upcoming_dis_bycounty = mysql_fetch_assoc ($upcomingdis));
                                        ?></select></td>
            <td><select name="ven_id">
                                        <?php
                                            $upvenbycounty_set = upcoming_venevents_bycounty($url_countyid);
                                            $upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                          ?>   <option value="<?php echo $upcoming_ven_bycounty ['ven_id']; ?>" >
                                        <?php echo $upcoming_ven_bycounty ['ven_name']; ?></option>
                                        <?php
                                        } while ($upcoming_ven_bycounty = mysql_fetch_assoc ($upvenbycounty_set));
                                        ?></select></td>
            <td><select name="champ_id">
                                        <?php
                                            $championship_set = findchampionships();
                                            $champlist = mysql_fetch_assoc ($championship_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $champlist ['champ_id']; ?>" >
                                        <?php echo $champlist ['champ_description']; ?></option>
                                        <?php
                                        } while ($champlist = mysql_fetch_assoc ($championship_set));
                                        ?></select></td>
            <td>
            <select name="org_id">
                            <?php
                                $uporgbycounty_set = upcoming_organevents_bycounty($url_countyid);
                                $upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set);
                            ?>
                            <?php
                            do {
                            ?>   <option value="<?php echo $upcoming_org_bycounty ['org_id']; ?>" ><?php echo $upcoming_org_bycounty ['org_name']; ?></option>
                            <?php
                            } while ($upcoming_org_bycounty = mysql_fetch_assoc ($uporgbycounty_set));
                            ?></select>
            </td>
            <td><select name="***_id">
                                        <?php
                                            $upassbycounty_set = upcoming_assevents_bycounty($url_countyid);
                                            $upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set);
                                        ?>
                                        <?php
                                        do {
                                        ?>   <option value="<?php echo $upcoming_assbycounty ['***_id']; ?>" >
                                        <?php echo $upcoming_assbycounty ['***_description']; ?></option>
                                        <?php
                                        } while ($upcoming_assbycounty = mysql_fetch_assoc ($upassbycounty_set));
                                        ?></select></td>
              <td><input name="submit" type="submit" /><input name="countyid" type="hidden" value="<?php echo $url_countyid ['url_countyid']; ?>" /></td>
            </tr>
          </table>
      </form>
      <?php
    if (isset($_POST['submit'])){
        if (isset($_GET['go'])){
        $countyid = $_POST['countyid'];
        $ven_id = $_POST['ven_id'];
        $dis_id = $_POST['dis_id'];
        $champ_id = $_POST['champ_id'];
        $org_id = $_POST['org_id'];
        $event_id = $row['event_id'];
            $sql = "SELECT DATE_FORMAT (events.startdate, '%a, %d, %b')
                       AS stdate, events.event_id, events.title, events.ven_id, events.org_id,
                       venue.county_id, venue.ven_id, eventdisciplines.event_id, eventdisciplines.dis_id, county.county_id, discipline.dis_id \n"
                . "FROM events \n"
                . "LEFT OUTER JOIN eventdisciplines \n"
                . "ON events.event_id = eventdisciplines.event_id \n"
                . "LEFT OUTER JOIN discipline \n"
                . "ON eventdisciplines.dis_id = discipline.dis_id \n"
                . "LEFT OUTER JOIN venue \n"
                . "ON events.ven_id = venue.ven_id \n"
                . "LEFT OUTER JOIN county \n"
                . "ON venue.county_id = county.county_id \n"
                . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n"
                . "AND events.startdate > NOW()\n"
                . "AND venue.county_id = {$countyid}  \n"
                . "ORDER BY startdate ASC";
        $result = mysql_query ($sql, $connection);
    ?>
    My problem is at the WHERE point,  how do I code for single and multipule selections,  The       . "WHERE events.ven_id = ({$ven_id} OR events.org_id = {$org_id})\n" throws and error.
    How am I best programing this type of query,  ??  Should it be with php ??

    The best thing is to dynamically build your where clause based on the user selection. Test the values of all form fields and if the user does not make a selection, do not include that in the where clause.
    Trying to build a single, static where clause that accounts for all possible user input permutations is extremely difficult.

  • Master detail form - drop down list in detail (ADF)

    Hi,
    Been racking our brains for a few days/weeks about this one, and would be grateful for any pointers why this does not work.
    We have developed an in-house application for dealing with risk and chemical assessments.
    The process we have adopted allows users to create an assessment first then they are taken to another form where they are then able to add risk factors/ or chemicals relating to the assessment. The intention is to present the user with the ability to select from a drop down list which contains the chemical names.
    We have been going through the forums and have tried all the examples we can find (all the examples work on our system), but when we try to adapt them to our approach they create an error indicating that they cannot find the values in the entity object.
    Has anyone else come across the same problem or is it that the ADF is not suited to dealing with the master/detail approach and drop down menus.
    The drop down lists are in an ADF table.
    Thanks in advance
    Andrew

    Hi Kuba,
    Thanks for the pointer, I think we tried that one early on. For the time being we have opted for using a selectInputText box, and that appears to be working. Well at least it has got us past the deadline for yesterday, now onto the next deadline.
    Thanks again!
    Andrew

  • Columns in af:table rendering multiple times when filtering drop-down list

    Technology: JDeveloper 10.1.3.0.4 SU5, ADF Faces/BC
    Page design:
    Master-detail jspx.
    Each section is an af:table.
    Drop-down lists created using instructions from http://www.oracle.com/technology/products/jdev/tips/muench/screencasts/editabletabledropdown/dropdownlistineditabletable.html?_template=/ocom/technology/content/print
    Requirement:
    Data in a drop-down list on a child record needs to be filtered based on data from one or more columns in the currently selected row of the parent record.
    Issue:
    Drop-down lists have been successfully filtered using a couple of different methods, however, any time the data from the parent record is used to filter the data the columns in the child af:table begin to render multiple times. Navigating through the parent rows may cause the child records to have the correct number of columns displayed or multiple copies of the columns displayed.
    Removing any reference to the parent view object and hard-coding values instead causes this behavior to disappear.
    Each of the following methods has been tried. Each filters drop-down list data correctly and each causes apparently random extra column renders.
    1.     Cascading lists as per: http://www.oracle.com/technology/products/jdev/tips/mills/cascading_lists.html
    2.     Drop-down list based on view object that takes parameters.
    3.     Set where clause for drop down list in a method on the app module.
    4.     Set where clause for drop-down list in a new selection listener method for the af:table.
    Question:
    Is there a solution available that will filter the drop-down lists correctly and prevent the extra columns from being rendered?
    Thank you for any help that you can provide,
    Joanne

    bump

Maybe you are looking for