Resetting a combo box

I have added a combo box to the invoice form and populated the validvalues collection with a list of warehouses for the user to choose from.  This only appears in Add mode. 
Everything works well except after adding an invoice, when all the SAP fields are reset to blanks or their default values,  the combo box still has the value that the user selected from the previous invoice.  I would like to have the box be empty (as it is when the form is first displayed).
Does anyone know how to do this?  SBO 2005  - Thanks in advance!

Hi John Chadwick 
You can try the following
try
       If oCombo.ValidValues.Count > 0 Then
                oCombo.ValidValues.Add("", "")
                oCombo.Select(oCombo.ValidValues.Count - 1, SAPbouiCOM.BoSearchKey.psk_Index)
                For i = 0 To oCombo.ValidValues.Count - 1
                    oCombo.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
                Next i
            End If
catch ex as exception
'leave blank
end try
Hope this helps

Similar Messages

  • Setting value in input combo box list of values programmatically.

    Hi,
    I have the following requirement.
    I have a combo box LOV defined in the column of application table. Whenever the user is trying to change this value, I need to check for a condition and invoke a warning popup with yes/no button and allow the user to change if dialog outcome is 'yes'. If the outcome is 'No', then i need to reset the combo box to its original value. To do this, in the valuechangelistener of LOV, I am invoking the warning popup and control will coming out of the valuechangelistener and dialog listener will be called.
    How do i set the combo box value in dialog listener ? and How do I retain the existing value of the LOV if user clicks on 'No' button.
    Jdev Version : Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493
    Thanks in advance.
    Harish

    You could, for example. store both of them (old value, along with new one) in the pageFlowScope. You can do that in the valueChangeListener (before calling popup), and use them in the dialog listener...

  • Report error when using combo box and one text field is empty

    I'm building an interactive pdf in adobe pro 9. My problem is the following: I have one text field where you can enter a numeric code and that is used to populate another text field when I choose an option on one combo box.For example: suppose I write the code 123 in the text field "A" and that the combo box has two options ("data" and "-"). When I select "-", another text field "B" is empty, while when I select "data" i populate the text field "B" using the code entered "A" with the text "data_123". In order to do this I use the standard javascript code in the Format>Custom tab of the combo-box.
    My questions are:
    - how can I prevent the pdf to proceed selecting an option in the combo box when the field "A" is empty?
    - how can I update the field "B" every time that I change the text in "A"? I found that the text is "B" is updated only when I press the selection in the combo box.

    You can set the combo box to read-only in the Validate event of the A field:
    // Validate script for text field
    getField("combo1").readonly = !event.value;
    To update the value of B when A changes, you can expand the script above to something like:
    // Validate script for text field
    var f1 = getField("combo1");
    var f2 = getField("B");
    // If there is an entry in the A field...
    if (event.value) {
        f1.readonly = false;  // Make sure the combo box is activated
        f2.value = f1.value === "-" ? "" : "fa.value + event.value;  // Update the value of field B
    } else {
        f1.readonly = true;  // Deactivate the combo box
        f2.value = f2.defaultValue;  // Reset field B
    You might also want to reset the combo box somewhere in there, but it's not clear to me when you would want to do that.

  • Problem with combo boxes and the reset button in certain situations

    Hi Everyone,
    i have a problem to make the reset-button function properly in an what-if analysis dashboard.
    The dashboard uses two combo boxes that are not visible at the same time. In my application the second combo box only appears when a dedicated menu (label based menu button) has been activated.
    So i have combo box 1 when menu A is active an dand combo box 2 when menu 2 is active.
    After starting the dashboard initial values are fine. If you then directly change to menu 2 (seeing combo box 2 with
    the correct default value) and press the reset button, the dashboard returns to the initial view, showing
    the menu 1 with the correct default value. If you now switch back  to menu 2, you will see, that the combo box 2
    is empty (i.e. nothing selected).
    I also tracked the destination cells for the combo box value results as well as the source cells for the "selected item" and the
    destination cells for the "Insert Selected Item". All this values seem to be correct. Therefore i assume that
    this is an issue of event handling. Maybe the combo box 2 does not refresh its selected value because it is already
    invisible when the values are restored.
    This case can easily be simulated by placing two combo boxes and a push button (that changes the visibility of
    the combo boxes) and the reset button on the canvas.
    Maybe someone can help. I am able to provide a test xlf, if neccessary.
    Thanks,
    Oliver
    P.S. I am using Xcelsius SP4 (Version 5.4.0.0)

    Hello Debjit_Singha_86,
    thank you for your support. At the moment i have the following setting:
    label based menu
    - General: Insertion Type "value" from a list of ID's for the menu-items to a dedicated cell (current menu ID, say tab1!$A$1)
    - Behavior: Selected item (position) fixted to item 1
    hidden combo box
    - General: Insertion Type "position" to a dedicated cell with the current choice (say tab1!$B$1)
    - Behavior: Selected item (position) to the same cell (tab1!$B$1)
    Can you give me a hint on how to connect the two components according to your solution, so that the label based menu sets the default for the hidden combox box only in case, that the reset button is pressed?
    Thanks,
    Oliver

  • Combo Box in Portal Form resets after query

    Hello all,
    I have a portal form based on Stored Procedure. In it I have a Location combo box and Query button in addition to few text items. Users can select location from the drop down list and hit Query button to view the values in for the text items. The query part is working fine. But after query the Location resets to Null (as the LOV which feeds the combo box can have Null). We would like to keep the location they chose to query up even after the query results. Any help is appreciated.
    The Location item is in the parameters of the Stored Procedure. Initially it was IN, later I changed to IN OUT but there is no change in functionality.
    I also removed the ability to accept NULL for the LOV which feeds Location Combo box but now it is displaying the first location on the list after the query, which is even worse.
    Thanks in advance,
    Manohar

    You're catching Exceptions in empty catch() blocks. There might have been an exception, but you won't know if the catch block doesn't do anything.
    Try something like this:
    catch(SQLException e){
        System.err.println( "Problem with db query"+e.getMessage() );
        e.printStackTrace( System.err );
    }in order to see what's going wrong with your code.

  • Combo box retaining selected value?

    Hi,
    I have a requirement to display a value based on a selection in a combo box.  This is a training company and we wish to view the number of people booked onto a selected course.
    I am using a web service to bring the data into Xcelsius in two columns - 'Course' and 'no of people'.
    I can get the combo box to read the list of courses, but when the data from the web service refreshes, the combo box reverts back to the default selection.
    Is there any way to avoid this?  I have just downloaded Xcelsius SP1, in case that's relevant.
    Thanks,
    Neil

    Hi there Neil,
    Any progress since the last post?  There really shouldn't be a reset of the component state based on the input of data to the Excel sheet.  I don't have any WS with multiple row/column output, so I'm having difficulty testing that scenario.  I've tried with QaaWS, which should be roughly the same in that regard; with a QaaWS I'm having no troubles.
    Outside chance:  Do you have Behavior > Common > Selected Item bound to one of the WS output cells?  That might reset the component state.
    Another idea:  Use a Trigger Cell or Connection Refresh Button instead of Refresh Every, if it really is a bug.  This will prevent the connection from refreshing and resetting your component.  It sounds like your WS doesn't have Input Value filtering and isn't volatile data, so Refresh Every is unnecessary for your usage.  A Trigger Cell or Connection Refresh button will refresh the WS just once, for the initial access. 
    Source Data:  It's found in the properties sheet under General > Data Insertion > Insertion Type > Source Data.
    <br>
    Javier

  • Glitch with combo boxes

    Hi all,
    In flash I have about 5 frames, each which have 7 combo boxes
    on them. The user selects the answers for each combo box and then
    clicks 'check' if they are correct they move on to the next frame.
    The only frame that is different is frame 3 which has combo boxes 4
    and 5 missing because they do not apply for that particular
    question.
    Once the user moves on past frame 3, some of the combo boxes
    show up blank (they are there but the default Index 0 "select" does
    not show up. If you click on the combo box it opens and you can
    choose one of the 5 choices in it, but once you select one it won't
    show up either.
    Does anyone know the cause of this problem or a solution?
    P.S. The combo boxes all have the same instance name
    throughout the whole file of 'cbo1' through 'cbo7' and are reset to
    index 0 at the beginning of each new frame.

    You do this by combining JSPs with a central servlet. I don't know how to do it with just one JSP on its own.
    The JSP does a <form> POST to the servlet. The servlet fetches the combo box values into a List, puts it into request scope, and forwards the response back to the JSP. The JSP gets the List out of request scope and populates the drop-down. You do the same thing when there's a selection in the drop-down: onChange does a POST back to the servlet, which gets the selected value as a parameter, takes the appropriate action, and forwards the response with new data in request scope back to the JSP.
    The trick is to have the data in request scope so the JSP can get it. I think you need a servlet to do that.

  • How do I populate one Combo box based on input from another

    Hi,
    I have a dynamic Combo box populated from a database. Now I want to use the onChanged event to dynamically populate a second combo box on the same page.
    Any ideas on how to do this?
    Robert
    [email protected]

    Here is an example:
    let us consider it not coming from the database:
    <html>
    <head>
    <title>New Page 1</title>
    <script>
    function popSub()
    var n = 1;
    var mainValue;
    mainValue = document.test.main.options[document.test.main.selectedIndex].value ;
    if (mainValue=="Age" )
                        document.test.sub.options[n].value = 'below18';
                        document.test.sub.options[n].text = 'Below 18';
                        n =     n + 1;
    if (mainValue=="Age" )
                        document.test.sub.options[n].value = 'over18';
                        document.test.sub.options[n].text = 'Over 18';
                        n =     n + 1;
    if (mainValue=="Sex" )
                        document.test.sub.options[n].value = 'male';
                        document.test.sub.options[n].text = 'Male';
                        n =     n + 1;
    if (mainValue=="Sex" )
                        document.test.sub.options[n].value = 'female';
                        document.test.sub.options[n].text = 'Female';
                        n =     n + 1;
    </script>
    </head>
    <body>
    <form method="POST" name="test">
    <p><select size="1" name="main" onClick="popSub()">
    <option value="Age">Age</option>
    <option value="Sex">Sex</option>
    <option selected>select one</option>
    </select></p>
    <p><select size="1" name="sub">
    <option value=""></option>
    <option value=""></option>
    <option value=""></option>
    </select></p>
    <p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
    </form>
    </body>
    </html>
    If it coming from the database then you have to write the javascript function in jsp as follows:
    out.println('<script language="JavaScript">');
    out.println('function popSub()');
    out.println('{');
    out.println('var n = 1;');
    out.println('var mainValue;');
    out.println('mainValue = document.test.main.options[document.test.main.selectedIndex].value ;');
    // start one for loop from 1 to record count
    out.println('if (mainValue=="' + valuefrom the resultset + '")');
    out.println('{');
    out.println("document.test.sub.options[n].value = '" + value from the result set +"';");
    out.println("document.test.sub.options[n].text = '"+value from the result set+"';");
    out.println('n=n+1;');
    out.println('}');
    // end of the for loop
    finish the javascript function using out.println

  • Changing Drilldown on Stacked Coulmn Charts with auto-selected combo boxes

    Hello Experts,
    i have a big issue and no idea how to solve it. Hopefully you can help me. I would really appreciate that so thanks for any answer in advance.
    Here my problem:
    I have two stacked column charts and two combo boxes. Each combo box shows filtered row data in one chart. That works fine.
    Now i want to implement drilldown which will change the data of the other chart by clicking. Example: Chart 1 represents the working hours of different staffs, chart 2 represents working hour in different projects. Now, I have a staff A who works in projects A and B. Projects A and B are now the rows in chart 1. By clicking on row project A the second chart should show me the data of project A. In project A there are several members stacked in the chart showing the whole working hours of the project. Now i want to change the perspective by clicking on a row in chart 2 so the data of employee XY is showing up and so on.
    I realized it by drilldowns. however there is no data but the row's name insertion. this cell is my trigger cell for the combo boxes so it will choose the right person/project automatically if i click on a row. In both charts is "No Selection (-1)" activated, in combo boxes is "When Value changes" picked.
    At the beginning i worked fine. my dashboard had displayed the data i wanted by clicking on the rows. but at a specific point my dashboard crashes.
    I figured out that if i drill down once the selection will not disappear. so on two drill downs there is an automatically selection of a specific row and at the end my dashboard crashes and no data is displayed.
    To solve my problem i need something to deselect my selection automatically or a reset for only one graph. i have worked with push buttons but its like the reset button because the row's name disappear too.
    Whether Xcelsius components or excel formulas, i have no idea how to solve my problem.
    Im grateful for every hint.
    Kind regards
    Lars Schmidt

    Well I need to get this thing done by tomorrow. The
    end goal is a program that will take data from text
    boxes, wrap predefined XML tags around them, and
    export them to a XML file. He's also sent me another
    *.java file which creates a XML file, but that also
    doesn't workThat's nice.
    Sun's basic Java tutorial
    Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
    http://javaalmanac.com . A couple dozen code examples that supplement The Java Developers Almanac.
    jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
    JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
    Bruce Eckel's Thinking in Java (Available online.)
    Joshua Bloch's Effective Java
    Bert Bates and Kathy Sierra's Head First Java.
    James Gosling's The Java Programming Language. Gosling is
    the creator of Java. It doesn't get much more authoratative than this.

  • Need help dynamically building combo-boxes...

    How can I dynamically build drop down lists?
    I was thinking about using a dynamic page, with bind variables
    set for sql statements inside <oracle></oracle> tags, or passing
    the variable from the first selection to the second selection of
    another page (or the same page?)...
    Another thing I was thinking about would be to base a form on a
    DB procedure, and pass the selections to the procedure, and re-
    build the lists that way...
    I need to avoid client side processing (javascript) because of
    accessiblity concerns.
    Any ideas would be greatly appreciated...
    Ryan

    Ajay,
    The following is an excerpt of the code I used. Because of a
    lack of time, I haven't made the code generic. The code is used
    to interface with Oracle Reports 6i & Oracle Configurator. The
    configurator (config_hdr_id & config_rev_nbr) parameters are
    selected by the user and passed into Oracle Reports using related
    dynamic combo-boxes. Pay particular attention to the
    wwpro_api_parameters.get_value function as well as the onChange
    javascript. Hope you can take pieces of this for an example.
    The following is the code for a Portal dynamic page:
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1">
    <title>Configurator Reports</title>
    <SCRIPT LANGUAGE="JavaScript1.1">
    <!-- Comment out script for old browsers
    ** this function will open a new URL for the Reports CGI
    ** executable to run the report
    function runReport()
    // semi-constants for JavaScript
    var cgiexe = "runrep.sh";
    var slash = "/";
    var colon = ":";
    var qmark = "?";
    var paramsep = "&";
    ** URL parameter values
    ** We should check for nulls, http://, etc. but not for now
    var dtlist = document.REPFORM.WEBHOST;
    var WEBHOST = dtlist.options[dtlist.selectedIndex].value;
    var WEBPORT = document.REPFORM.WEBPORT.value;
    var dtlist = document.REPFORM.SERVER;
    var SERVER = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.REPORT;
    var REPORT = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.P_HEADER_ID;
    var P_HDR_ID = dtlist.options[dtlist.selectedIndex].value;
    var P_REV_NBR = document.REPFORM.P_REV_NBR.value;
    var dtlist = document.REPFORM.USERID;
    var USERID = dtlist.options[dtlist.selectedIndex].value;
    var dtlist = document.REPFORM.DESTYPE;
    var DESTYPE = dtlist.options[dtlist.selectedIndex].value;
    var dflist = document.REPFORM.DESFORMAT;
    var DESFORMAT = dflist.options[dflist.selectedIndex].value;
    var dtlist = document.REPFORM.MIMETYPE;
    var MIMETYPE = dtlist.options[dtlist.selectedIndex].value;
    // construct the final URL given the parameters
    var URL = "http://" + WEBHOST + colon + WEBPORT +
    "/dev60cgi/"
    + cgiexe + qmark +
    "server=" + SERVER + paramsep +
    "report=" + REPORT + paramsep +
    "p_header_id=" + P_HDR_ID + paramsep +
    "p_rev_nbr=" + P_REV_NBR + paramsep +
    "userid=" + USERID + paramsep +
    "destype=" + DESTYPE + paramsep +
    "desformat=" + DESFORMAT + paramsep +
    "mimetype=" + MIMETYPE;
    // alert("Opening a window with the following URL : \r\r" +
    URL);
    // open the new window with the constructed URL
    //runWindow = window.open(URL);
    //Point the current window to the URL to run the form
    this.window.location.href=URL;
    function getRevision(form)
    var l_config_hdr_id =
    form.P_HEADER_ID.options[form.P_HEADER_ID.selectedIndex].value;
    window.location.href =
    "/pls/portal30/!PORTAL30.wwpob_page_util.redirect?_pageid=61&_tab
    string=&_portletmode=&_cache=1&cz.p_config_hdr_id="+l_config_hdr_
    id;
    return false;
    //-->
    </SCRIPT>
    </head>
    <body>
    <form NAME="REPFORM" METHOD="GET" onSubmit="return false">
    <table BORDER=0 CELLSPACING="5" valign="top" align="left">
    <tr>
    <td ALIGN=LEFT COLSPAN="2"><font face="arial" size="-1"><B>Enter
    configuration data and click the button to submit the selected
    report.</B></font></td>
    </tr>
    <TR><TD> </TD></TR>
    <tr><td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Parameters</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Report:</font></td>
    <td><font face="arial" size="-1"><select NAME="REPORT">
    <option SELECTED
    VALUE="portal_test_report_6i.rdf">portal_test_report_6i.rdf
    </select></font></td>
    </tr>
    <ORACLE>
    -- Dynamically retrieving the Configurator Header ID's.
    -- kreierso 8-oct-01
    declare
    v_config_hdr_id oc_config_ord_qte_lookup.config_hdr_id%type;
    begin
    v_config_hdr_id :=
    to_number(portal30.wwpro_api_parameters.get_value('p_config_hdr_i
    d','cz'));
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Header ID:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_HEADER_ID" onchange="getRevision(this.form)">');
    htp.p('<OPTION VALUE=" "> ');
    for r_get_hdr_values in (
    select cz.config_hdr_id, cz.config_rev_nbr
    from cz_config_hdrs cz
    order by cz.config_hdr_id desc
    ) loop
    if v_config_hdr_id = r_get_hdr_values.config_hdr_id then
    htp.p('<OPTION SELECTED
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    else
    htp.p('<OPTION
    VALUE="'||r_get_hdr_values.config_hdr_id||'">'||r_get_hdr_values.
    config_hdr_id);
    end if;
    end loop;
    htp.p('</SELECT></font>');
    htp.p('</TD></TR>');
    htp.p('<TR><TD ALIGN="left"><font face="arial"
    size="-1">Configuration Revision:</font></TD>');
    htp.p('<TD><font face="arial" size="-1"><SELECT
    NAME="P_REV_NBR">');
    for r_get_rev_values in (
    select cz.config_rev_nbr
    from cz_config_hdrs cz
    where cz.config_hdr_id = v_config_hdr_id
    order by cz.config_rev_nbr desc
    ) loop
    htp.p('<OPTION
    VALUE="'||r_get_rev_values.config_rev_nbr||'">'||r_get_rev_values
    .config_rev_nbr);
    end loop;
    htp.p('</SELECT></font></TD></TR>');
    end;
    </ORACLE>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Format:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESFORMAT">
    <option SELECTED VALUE="RTF">RTF
    <option VALUE="PDF">PDF
    <option VALUE="HTML">HTML</select></font></td>
    </tr>
    <tr><td> </td></tr>
    <tr>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="SUBMIT"
    NAME="Runrep" VALUE="Run Report"
    onClick="runReport();"></FONT></td>
    <td ALIGN=RIGHT><FONT face="arial" size="-1"><input TYPE="RESET"
    NAME="Reset" VALUE="Reset"></FONT></td>
    </tr>
    </table></td>
    <td valign="top"><table BORDER=0 CELLSPACING="2">
    <TR><TD COLSPAN="3" ALIGN="LEFT">
    <FONT COLOR="#6666CC" FACE="arial,helvetica"
    SIZE="-1"><NOBR><B>Report Paremeters (Hidden
    Candidates)</B></NOBR></FONT>
    </TD></TR>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Userid:</font></td>
    <td><font face="arial" size="-1"><select NAME="USERID">
    <option SELECTED
    VALUE="kreierso/password@DEV11">kreierso/password@DEV11
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Type:</font></td>
    <td><font face="arial" size="-1"><select NAME="DESTYPE">
    <option SELECTED VALUE="cache">cache
    <option VALUE="Printer">printer
    <option VALUE="File">file
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Mimetype:</font></td>
    <td><font face="arial" size="-1"><select NAME="MIMETYPE">
    <option SELECTED VALUE="application/msword">application/msword
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Reports
    Server:</font></td>
    <td><font face="arial" size="-1"><select NAME="SERVER">
    <option SELECTED
    VALUE="Rep60_dev11_shane.dci.com">Rep60_dev11_shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Host:</font></td>
    <td><font face="arial" size="-1"><select NAME="WEBHOST">
    <option SELECTED VALUE="shane.dci.com">shane.dci.com
    </select></font></td>
    </tr>
    <tr>
    <td ALIGN=LEFT><font face="arial" size="-1">Web Port:</font></td>
    <td><font face="arial" size="-1"><input type=hidden
    NAME="WEBPORT" VALUE="7500">7500</font></td>
    </tr>
    </td></tr></table>
    <TR><TD> </TD></TR>
    <TR><TD ALIGN="CENTER" COLSPAN="2">
    <font face="arial" size="+1" color="#000099">This is currently
    being developed.... ~Thanks, Kirk.</font>
    </TD></TR>
    </table>
    </form>
    </body>
    </html>

  • How to populate data in the data table on combo box change event

    hi
    i am deepak .
    i am very new to JSF.
    my problem is i want to populate data in the datatable on the combo box change event.
    for example ---
    combo box has name of the city. when i will select a city
    the details of the city should populate in the datatable. and if i will select another city then the datatable should change accordingly..
    its urgent
    reply as soon as possible
    thanks in advance

    i am using Rational Application Developer to develop my application.
    i am using a combo box and i am assigning cityName from the SDO.
    and i am declaring a variable in the pageCode eg.
    private String cityName;
    public void setCityName(String cityName){
    this.cityName = cityName;
    public String getCityName(){
    return cityName;
    <h:selectOneMenu id="menu1" styleClass="selectOneMenu" value="#{pc_Test1.loginID}" valueChangeListener="#{pc_Test1.handleMenu1ValueChange}">
                        <f:selectItems
                             value="#{selectitems.pc_Test1.usercombo.LOGINID.LOGINID.toArray}" />
                   </h:selectOneMenu>
                   <hx:behavior event="onchange" target="menu1" behaviorAction="get"
                        targetAction="box1"></hx:behavior>
    and also i am declaring a requestParam type variable named city;
    and at the onChangeEvent i am writing the code
    public void handleMenu1ValueChange(ValueChangeEvent valueChangedEvent) {
    FacesContext context = FacesContext.getCurrentInstance();
    Map requestScope = ext.getApplication().createValueBinding("#{requestScope}").getValue(context);
    requestScope.put("login",(String)valueChangedEvent.getNewValue());
    and also i am creating another SDO which is used to populate data in datatable and in this SDO in the where clause i am using that requestParam .
    it is assigning value in the pageCode variable and in the requestParam but it is not populating the dataTable. i don't no why??
    it is possible that i may not clear at this point.
    please send me the way how my problem can be solved.
    thanks in advance

  • How to Bind a Combo Box so that it retrieves and display content corresponding to the Id in a link table and populates itself with the data in the main table?

    I am developing a desktop application in Wpf using MVVM and Entity Frameworks. I have the following tables:
    1. Party (PartyId, Name)
    2. Case (CaseId, CaseNo)
    3. Petitioner (CaseId, PartyId) ............. Link Table
    I am completely new to .Net and to begin with I download Microsoft's sample application and
    following the pattern I have been successful in creating several tabs. The problem started only when I wanted to implement many-to-many relationship. The sample application has not covered the scenario where there can be a any-to-many relationship. However
    with the help of MSDN forum I came to know about a link table and managed to solve entity framework issues pertaining to many-to-many relationship. Here is the screenshot of my application to show you what I have achieved so far.
    And now the problem I want the forum to address is how to bind a combo box so that it retrieves Party.Name for the corresponding PartyId in the Link Table and also I want to populate it with Party.Name so that
    users can choose one from the dropdown list to add or edit the petitioner.

    Hello Barry,
    Thanks a lot for responding to my query. As I am completely new to .Net and following the pattern of Microsoft's Employee Tracker sample it seems difficult to clearly understand the concept and implement it in a scenario which is different than what is in
    the sample available at the link you supplied.
    To get the idea of the thing here is my code behind of a view vBoxPetitioner:
    <UserControl x:Class="CCIS.View.Case.vBoxPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:v="clr-namespace:CCIS.View.Case"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    d:DesignWidth="300"
    d:DesignHeight="200">
    <UserControl.Resources>
    <DataTemplate DataType="{x:Type vm:vmPetitioner}">
    <v:vPetitioner Margin="0,2,0,0" />
    </DataTemplate>
    </UserControl.Resources>
    <Grid>
    <HeaderedContentControl>
    <HeaderedContentControl.Header>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
    <TextBlock Margin="2">
    <Hyperlink Command="{Binding Path=AddPetitionerCommand}">Add Petitioner</Hyperlink>
    | <Hyperlink Command="{Binding Path=DeletePetitionerCommand}">Delete</Hyperlink>
    </TextBlock>
    </StackPanel>
    </HeaderedContentControl.Header>
    <ListBox BorderThickness="0" SelectedItem="{Binding Path=CurrentPetitioner, Mode=TwoWay}" ItemsSource="{Binding Path=tblParties}" />
    </HeaderedContentControl>
    </Grid>
    </UserControl>
    This part is working fine as it loads another view that is vPetioner perfectly in the manner I want it to be.
    Here is the code of vmPetitioner, a ViewModel:
    Imports Microsoft.VisualBasic
    Imports System.Collections.ObjectModel
    Imports System
    Imports CCIS.Model.Party
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' ViewModel of an individual Email
    ''' </summary>
    Public Class vmPetitioner
    Inherits vmParty
    ''' <summary>
    ''' The Email object backing this ViewModel
    ''' </summary>
    Private petitioner As tblParty
    ''' <summary>
    ''' Initializes a new instance of the EmailViewModel class.
    ''' </summary>
    ''' <param name="detail">The underlying Email this ViewModel is to be based on</param>
    Public Sub New(ByVal detail As tblParty)
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Me.petitioner = detail
    End Sub
    ''' <summary>
    ''' Gets the underlying Email this ViewModel is based on
    ''' </summary>
    Public Overrides ReadOnly Property Model() As tblParty
    Get
    Return Me.petitioner
    End Get
    End Property
    ''' <summary>
    ''' Gets or sets the actual email address
    ''' </summary>
    Public Property fldPartyId() As String
    Get
    Return Me.petitioner.fldPartyId
    End Get
    Set(ByVal value As String)
    Me.petitioner.fldPartyId = value
    Me.OnPropertyChanged("fldPartyId")
    End Set
    End Property
    End Class
    End Namespace
    And below is the ViewMode vmParty which vmPetitioner Inherits:
    Imports Microsoft.VisualBasic
    Imports System
    Imports System.Collections.Generic
    Imports CCIS.Model.Case
    Imports CCIS.Model.Party
    Imports CCIS.ViewModel.Helpers
    Namespace CCIS.ViewModel.Case
    ''' <summary>
    ''' Common functionality for ViewModels of an individual ContactDetail
    ''' </summary>
    Public MustInherit Class vmParty
    Inherits ViewModelBase
    ''' <summary>
    ''' Gets the underlying ContactDetail this ViewModel is based on
    ''' </summary>
    Public MustOverride ReadOnly Property Model() As tblParty
    '''' <summary>
    '''' Gets the underlying ContactDetail this ViewModel is based on
    '''' </summary>
    'Public MustOverride ReadOnly Property Model() As tblAdvocate
    ''' <summary>
    ''' Gets or sets the name of this department
    ''' </summary>
    Public Property fldName() As String
    Get
    Return Me.Model.fldName
    End Get
    Set(ByVal value As String)
    Me.Model.fldName = value
    Me.OnPropertyChanged("fldName")
    End Set
    End Property
    ''' <summary>
    ''' Constructs a view model to represent the supplied ContactDetail
    ''' </summary>
    ''' <param name="detail">The detail to build a ViewModel for</param>
    ''' <returns>The constructed ViewModel, null if one can't be built</returns>
    Public Shared Function BuildViewModel(ByVal detail As tblParty) As vmParty
    If detail Is Nothing Then
    Throw New ArgumentNullException("detail")
    End If
    Dim e As tblParty = TryCast(detail, tblParty)
    If e IsNot Nothing Then
    Return New vmPetitioner(e)
    End If
    Return Nothing
    End Function
    End Class
    End Namespace
    And final the code behind of the view vPetitioner:
    <UserControl x:Class="CCIS.View.Case.vPetitioner"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:vm="clr-namespace:CCIS.ViewModel.Case"
    mc:Ignorable="d"
    Width="300">
    <UserControl.Resources>
    <ResourceDictionary Source=".\CompactFormStyles.xaml" />
    </UserControl.Resources>
    <Grid>
    <Border Style="{StaticResource DetailBorder}">
    <Grid>
    <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    </Grid.ColumnDefinitions>
    <TextBlock Grid.Column="0" Text="Petitioner:" />
    <ComboBox Grid.Column="1" Width="240" SelectedValuePath="." SelectedItem="{Binding Path=tblParty}" ItemsSource="{Binding Path=PetitionerLookup}" DisplayMemberPath="fldName" />
    </Grid>
    </Border>
    </Grid>
    </UserControl>
    The problem, presumably, seems to be is that the binding path "PetitionerLookup" of the ItemSource of the Combo box in the view vPetitioner exists in a different ViewModel vmCase which serves as an ObservableCollection for MainViewModel. Therefore,
    what I need to Know is how to route the binding path if it exists in a different ViewModel?
    Sir, I look forward to your early reply bringing a workable solution to the problem I face. 
    Warm Regards,
    Arun

  • Not able to populate data in the combo box

    Hi Guys,
    I m new to flex development and I want to populate the data
    coming from the databasein the combobox.I am able to get the length
    .but not able to populate the data.
    Can anyone helpme out?
    The code is below:
    The data displayed in the combox box is displayed as
    [object],[object] etc.I m sure that the data is coming from the
    database and its not populated in the combo box.any help is
    appreciated.
    private function getParkinfo(event:ResultEvent):void
    { Alert.show(event.result.length.toString());
    countries.dataProvider = event.result;
    <mx:ComboBox id="countries" />

    What does the data look like in the result? Is it XML? Post a
    sample of it.

  • Display data in list and combo box

    hi all....
    how to display data from database in list and combo box? i use MYSQL...
    help me please..... tq...

    1 - Write a query to retrieve the data you want from database
    2 - In a servlet, connect to database, Run the query, scroll through the result set and put the data into a list of Java Objects.
    3 - Set a request/session attribute of that list of objects
    4 - Forward to JSP
    5 - In JSP, create a <select> box, and then use a <c:forEach> loop to generate <option> tags from the list.

  • Show text box from one combo box selection

    Total newb here and need help.  I tried searching for a javascript to copy/paste, but without any luck.  I am using Acrobat Pro 9.2.0.  If you could help me out with the javascript or with directions on how to make the following be accomplished, I would be greatly appreciative.
    I am creating a fillable PDF and currently have a combo box that is labeled "Internship Satisfied By" with the options of "TCoB PDP", "MRKTNG 4185", and "Other College".  I would like a hidden text box (where the end user can fill in to explain) to become visible only when the end user selects the "Other College" option, but stay hidden for the other selections.  The hidden text box is labeled "Internship Explained".
    Thanks in advance! Jarrod

    Use this code as the combo box's validation script:
    if (event.value == "Other College") {
    getField("Internship Explained").display = display.visible;
    } else {
    getField("Internship Explained").display = display.hidden;

Maybe you are looking for