Dropdown Lisx box in servlets

HI,
I have a servlet with dropdown list box and text item. Whenever i choose the value based on that I have to display some data
below the these Items.( Dropdown and Text item).
The input in the text item will search in the below diplayed data and re-display again.
My question is, when i change the value in the dropdown listbox, it is not changing the data and selected value is
NOT staying in the dropdown listbox. can anybody help me in this problem.
Here is my code...
out.println("<HTML>");
out.println("<HEAD>");
out.println("</HEAD>");
String i_country="USA";
String i_key =" ";
out.println("<BODY onLoad=\"document.lov.i_key.focus()\">");
out.println("<DIV align=left>");
out.println("<FORM ACTION=physician_internal_medical_school_popup name=lov>");
// out.println("<INPUT TYPE=hidden NAME=pProfessionID VALUE=1>");
out.println("<FONT FACE=Arial,Helvetica SIZE=-1>Country:<SELECT NAME=i_country onChange=\"document.lov.submit()\">");
while(Country.next())
if(Country.getString("country").equals(i_country))
out.println("<OPTION SELECTED>"+Country.getString("country"));
else{
out.println("<OPTION>"+Country.getString("country"));
} // End of IF stmt
} // End of While Country
out.println("</SELECT>");
out.println("</FONT>");
out.println("<FONT FACE=Arial,Helvetica SIZE=-1>Search:</FONT><INPUT TYPE=text NAME=i_key SIZE=20 MAXLENGTH=20 onChange=\"document.lov.submit()\" VALUE="+ i_key+">");
out.println("</FORM>");
if ( i_country == "** UNKNOWN **")
School_2 = stmt3.executeQuery(" SELECT name "+
"     FROM LP_SCHL_PRG "+
"          WHERE profession_id = "+p_profession_id +
"          AND country IS NULL "+
" AND name LIKE '%"+i_key+"%'"+
"          ORDER BY 1" );
while(School_2.next())
out.println("<FONT FACE=Arial,Helvetica SIZE=-2><A HREF=\"javascript:sendValue('Albany Medical College')\">"+School_2.getString("name")+"</A></FONT><BR>");
} // End of While School_2
}else
School_1 = stmt2.executeQuery(" SELECT name "+
"     FROM LP_SCHL_PRG "+
"          WHERE profession_id = "+p_profession_id +
"          AND country = '"+i_country +"'"+
" AND UPPER(name) LIKE '%"+i_key+"%'"+
"          ORDER BY 1 ");
while(School_1.next())
out.println("<FONT FACE=Arial,Helvetica SIZE=-2><A HREF=\"javascript:sendValue('Medical College')\">"+School_1.getString("name")+"</A></FONT><BR>");
} // End of While School_2
} // End of If
out.println("</FORM>");
out.println("</DIV>");
out.println("</BODY>");
out.println("</HTML>");

Just a hint:
I think that
get reference of status_tab into M_MAT_REF
creates a reference to the local variable status_tab.
At the time then the drop-down is rendered, this local variable does not exist anymore.
I would try is this way
  FIELD-SYMBOL <fs> TYPE TIHTTPNVP.
  CREATE DATA me->m_mat_ref TYPE TIHTTPNVP.
  ASSIGN me->m_mat_ref->* TO <fs>.
  <fs> = status_tab.
or this way
1) change the type of m_mat_ref to TYPE TIHTTPNVP (not TYPE REF TO TIHTTPNVP).
2)
DATA lr_mat_ref TYPE REF TO TIHTTPNVP.
m_mat_ref = status_tab.
GET REFERENCE OF m_mat_ref INTO lr_mat_ref.
p_replacement_bee = CL_HTMLB_DROPDOWNLISTBOX=>FACTORY(
id = p_cell_id
selection = m_row_ref->STATUS
table = lr_mat_ref
nameOfKeyColumn = 'NAME'
nameOfValueColumn = 'VALUE' ).

Similar Messages

  • How to read the selected value of a dropdown list box

    Hello,
    I have 2 custom fields which are of type dropdown list on Accounts(CRMM_ACCOUNT) PCUI application details tab.I need to read the selected value of first dropdown list item,based on that second dropdown list will be populated.
    I know where to populate the dropdown list box,it is in FILL_DROPDOWN_LISTBOX.
    I dont know how to trap the selection made on dropdown list.
    PLease guide me on how to trap the dropdown list field selection value.
    Thanks in advance.
    Thirumala.

    Hello,
    Check what is done in standard for the fielf REGION which is inked to the country.
    Otherwise, you can do the following :
    - in field group customizing, for field 1, flag the 'send request' flag. So, when you change the value in this field via the dropdown, the MAC methods are immediately called.
    - Put the new value in a global variable (GV).
    - in the fill_dropdown_listbox method, get the value from this GV and based on it, filter the values for the dropdown of field 2.
    Hope this will help you,
    Regards,
    Frederic

  • Is it possible to enter our own value in dropdown list box in Module Pool. How?

    Dear Experts,
    Being new to ABAP, I am trying my hands on Dropdownlist box on Module Pool.
    I want to pull data from Ztable(Custom Table) into Dropdown list box on Screen in Module pool and be able to edit it, delete it and enter new data through it, thus thereby able to manage the Ztable. Is it possible in dropdown.
    Looking forward for experts advice.
    Regards
    Deepika

    Dear Kannan,
    Thanks. But why sud I write an event in Table maintenance generator. My code is in Module Pool and it has no connection with Table Msintenance.
    The I/O field Drop down list box is on the Screen in my Module Pool. I am able to pull data in it from Ztable but now I want to edit this pulled data and also want to enter new data in this dropdown list box.
    Regards
    Deepika

  • Selected value in dropdown list box

    hi forums,
      how to capture the selected value in drop down list box and how it will link with the table.
    layout:
        <htmlb:dropdownListBox  id = "d1%>"
                                nameOfKeyColumn = "vbeln"
                              nameOfValueColumn = "vbeln"
                             table       = "<%=it_sales%>" />
    in dropdown list box,how do i capture the selected values.
    OnInitialization:
    Select vbeln from vbak
      into corresponding fields of table it_sales.
    regards,
    ravi.

    hi Ravikiran,
       In button even,we r mension the event_type = 'click'.
    but in dropdownListBox what is the event_type.
    i tryed like this.
    DATA : EVENT TYPE REF TO CL_HTMLB_EVENT.
    ***this is for button************
    *event = CL_HTMLB_MANAGER=>get_event( RUNTIME->SERVER->REQUEST ).
    *IF event->NAME = 'button' AND event->event_TYPE = 'click'.
    DATA : button_event TYPE REF TO CL_HTMLB_EVENT_BUTTON.
    button_event ?= event.
    *ENDIF.
    *********this is for dropdownListBox**********
      event = CL_HTMLB_MANAGER=>get_event( runtime->server->request ).
      IF event->name = 'dropdownListBox' AND event-         >event_type = 'selection'.
           DATA :  dd_listbox_event TYPE REF TO CL_HTMLB_EVENT_SELECTION.
           dd_listbox_event ?= event.
    CASE EVENT->ID.
    when 'id1'.
    CALL METHOD REQUEST->GET_FORM_FIELD
          EXPORTING
            NAME  = 'id1'
          RECEIVING
            VALUE = SEL.
    WHEN 'myButton'.
       CALL METHOD REQUEST->GET_FORM_FIELD
         EXPORTING
           NAME  = 'id1'
         RECEIVING
           VALUE = SEL.
    ENDCASE.
    endif.
    with regards,
    ravi.

  • Can i insert a dropdown selection box for a cell

    Hi,
    I have an exel spreadsheet that contains a dropdown selection box in one cell. allof the other formulae in the sheet work except the drop down. Is this possible in numbers on the ipad?
    Thanks

    Hi Paul,
    Apple vocabulary for this is pop-up menu. In the Mac version of Numbers, it's a cell format, so if it's supported in the iOS version, I suspect you'll find it in the same place as you'd find other ways to format a cell—number, percentage, text, etc.
    I've requested your question be transferred to the iWork for iOS community, where the iPad Numbers experts hang out, and where you'll get a more definitive answer.
    Regards,
    Barry

  • Filtering values in a dropdown list box

    Hello Team
    In the BSP application CRM_IC, we want a drop down list box to be filled based on the entry selected from another dropdown list box. We have all the entries for the second drop down box in ABAP internal table .However, we do not want a server round trip to happend in doing so. Thus we have used the attribute 'Onclientselect' and we are trying to call a java script function call on this event to filter this ABAP internal table . In this function, we would like to fill the contents of the second dropdown list box after reading the contents of the first dropdown list box. Please advice us as to how this can be achieved. Basically, we observed that ABAP server side script is not executed in the java function.
    Thanks
    Rony

    Rony,
    I have used the following technique to synchronize the
    contents of two drop down list boxes.
    <b>Scenario:</b>
    The selection in listbox ddlbxSystemEquipNum, which I
    will call "A", determines the contents of listbox
    ddlbxModuleEquipNum, which I will call "B".
    I use a JavaScript array to shadow the ABAP internal
    table containing the possible values for listbox B.
    When the page is initially displayed, listbox B is
    populated from the ABAP internal table.
    When a new selection is made in listbox A, I use the
    onClientSelect event to call a JavaScript function,
    updateModuleList(), to update the contents of listbox B
    from the JavaScript shadow array based on the selected
    value in listbox A.
    <b>Code Excerpts:</b>
    <u>Declare the JavaScript shadow array and listbox B update function</u>
    <script language="javascript" type="text/javascript">
        var moduleArray = new Array();
        function updateModuleList() {
            var selSystem = frmNrg1100.ddlbxSystemEquipNum;
            var selModule = frmNrg1100.ddlbxModuleEquipNum;
            // Get selected system equipment number
            var selected_system =
                    selSystem.options[selSystem.selectedIndex].value;
            // Clear module select options
            selModule.options.length = 0;
            // Add module select options for the selected system
            var j = 0;
            for (var k = 0; k < moduleArray.length; k++) {
                if ( (selected_system == moduleArray[k].system) ||
                                         moduleArray[k].system == "") {
                    selModule.options[j++] = new Option(moduleArray[k].text,
                                   moduleArray[k].value,
                                   moduleArray[k].selected) ;
    </script>
    <u>Specify the onClientSelect event handler on list box A</u>
    <htmlb:dropdownListBox
        id = "ddlbxSystemEquipNum"
        width      = "400"
        onClientSelect = "updateModuleList()"
    <u>ABAP and JavaScript to populate internal table and shadow array of possible values for listbox B</u>
    <%
    loop...
            wa_module_options-system   = wa_customer_tool-equipment_num_t.
            wa_module_options-text     = tool_list_text.
            wa_module_options-value    = wa_customer_tool-equipment_num_m.
            wa_module_options-selected = selected.
            append wa_module_options to module_options.
    %>
    <script language="javascript" type="text/javascript">
        // Add all possible Module select options to a JavaScript array of objects
        moduleArray[moduleArray.length] = {  system:"<%=wa_module_options-system %>",
                                               text:"<%=wa_module_options-text %>",
                                              value:"<%=wa_module_options-value %>",
                                           selected:"<%=wa_module_options-selected %>" } ;
    </script>
    <%
    endloop.
    %>
    Hope this helps.
    Regards,
    Shawn

  • Dropdown list boxes

    Hi friends,
    Could u please tell me how to create a module pool program to charge the content of a a field of database table in a Dropdown list boxes . Please provide me step by step Process or link of file.
    thinks .

    Hi Karim,
    see the below programs to fill the field with a valid listbox value, for example, in this program, I am building the listbox in the program and just assign P_FIELD a valid value from internal table'ivrm_values' . Create screen 100 and create a field call P_FIELD, make sure to select "ListBox" from the DropDown Field.
    report  zpavan_0001.
    type-pools: vrm.
    data: p_field(20) type c.
    data: ivrm_values type vrm_values.
    data: xvrm_values like line of ivrm_values.
    data: name type vrm_id.
    start-of-selection.
    Set default value, before calling the screen
      p_field = 'DEF'.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    name = 'P_FIELD'.
      xvrm_values-key = 'ABC'.
      xvrm_values-text = 'ABC'.
      append xvrm_values to ivrm_values.
      xvrm_values-key = 'DEF'.
      xvrm_values-text = 'DEF'.
      append xvrm_values to ivrm_values.
      xvrm_values-key = 'GHI'.
      xvrm_values-text = 'GHI'.
      append xvrm_values to ivrm_values.
      call function 'VRM_SET_VALUES'
           exporting
                id     = name
                values = ivrm_values.
    endmodule.                 " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
    endmodule.                 " USER_COMMAND_0100  INPUT
    Thanks and Regards,
    Pavankumar

  • LiveCycle 8.1 on Vista: dropdown list box doesn't show all values

    On Vista Business O/S, in LiveCycle 8.1, I am using a dropdown list for 254 items, not dynamically loaded (all values are declared in the definition of the object). When the form runs, the dropdown list appears. I can scroll through the list. However, the scroll stops short, never showing the last few items on the list.<br /><br />   Is there some limit I have exceeded or is there some know bug I have encountered or is there some other action I need to take so I can choose any item from the dropdown list?<br /><br />   Dropdown list box is defined as user-entered - optional, default <none>.<br />254 text items, longest item is 19 characters, average item is 10 characters long. <br /><br />   Thanks in advance for any help, hints, or tips you provide.<br /><br />Dr. Dave Dyer

    Dear Friends....
    it seems to be a bug of the SQL Server Data Tools, (SQL Server 2012 SP2)... I did the deploy of my Dashboard, (and details Reports), to my Test Reporting Services Server.. and everything works as expected....
    Cheers, Luis

  • How to attach value range table to dropdown list box

    Hi there,
    could u please explain me how to attach a value range table to dropdown list box (i.e I/O box with dropdown attribute as list with key).
    if possible please explain me with a sample code.
    Thanks in advance.
    -Tulasi.

    hi ...if the associated domain of the field that u are using as i.o field has value range the same will come as drop down list...u u select the list box option and click from dictionary check box on the attributes...
    To check if the domain has it or not...go to the domain..click on value range..u can see thr,...if values are not thr u can giv the same...
    Or if u are not refering to dictionary type then use fm VRM_SET_VALUes
    reward if the abv is helpful..

  • Dropdown dialog boxes will not work. I can click on the boxes, the dropdown appears, but I cannot make anything in the box operate. I just upgraded to 6.0.2 on a fresh install of Windows XP

    I use the net to pay bills. The dialog box on my bills have accounts in them, but I cannot make the account numbers work. I regularly go to websites that are several pages deep, but the dropdowns for the next page don't work. The numbers, as well as the accounts appear, but they cannot be highlighted to access them.

    I'm not sure if the crash is or isn't related to fonts.
    Deciphering the crash long is something I don't have any experience with.
    I'm not even sure how the crash log is structured. I've downloaded two screen captures: one from the top of the adobe Photoshop crash log and one from the bottom. Perhaps someone more knowledgeable than I can discern what may be causing the crash?
    Screen capture from the top of the Adobe Photoshop crash log:
    Screen capture from the bottom of the Adobe Photoshop crash log:
    Any ideas?
    Thanks a bunch.

  • Dynamic entry list in Dropdown List Box

    Hi All,
    I need to create a dropdown box in a form whose input is connected to the output of a bapi/query. I want the values of a field in the bapi to the elements of the entry list.
    Can anyone tell me how to create the entry list dynamically?
    Thanks,
    Sruti

    Hi,
    Create Drop-Down List in VC
    Go throgh this links...
    http://help.sap.com/saphelp_nw04s/helpdata/en/96/c33a3382914f6d8aeba11413e3e356/frameset.htm
    Web blog
    /people/thomas.jung/blog/2006/05/26/visual-composer-value-help-data-service
    Referece Guide
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9326072e-0c01-0010-bc97-f72e93338101
    and
    http://help.sap.com/saphelp_nw04s/helpdata/en/bf/39becc90824d4d999eb05336345e5e/frameset.htm
    Senthil K.

  • Blank line in DropDown List box

    I have a case where I want to add a blank entry in a drop down list box that is bound to a database table. I want the blank to be the default, then the user can select the bound values if desired. How do I do this without binding the drop down box to a prepopulated array?

    Hi
    Go to the JSP source of that page and add
    <f:selectItem itemLabel="None" itemValue="0"/> before
    the line <f:selectItems binding="#{Page1.dropdown1SelectItems}" ....
    With this you can deselect the previous selection by selecting None from the dropdown list. You can also use blank spaces instead of None.
    Thanks
    Srinivas

  • 2 cascading multiple dropdown list boxes that fill a form field in Infopath

    I have a request to do this:
    first field is a cascading list box is type of work (can select more than 1 type of work)( separate list)
    then based on the choices above the
    second cascading list box has the various people's names from the first list box (can select more than 1 person)(separate List )
    then I need to from the second list box have a form field hold the various email addresses of all the people selected in the second list box.
     how would I do a multiple tier cascade in Infopath form?

    those are good examples, but here is the thing the first two dropdowns can be more than 1 selection, could be 50 items selected.
    and selection 2 dropdown doesnt lookup into  selection 1. but they do have a related column.
    company name..... ( just  saying).

  • How to give save as dialog box using servlet?

    hello,
    i am building one application where i am generatinfreport in excel format.
    now the file generated is output.xsl.
    this is in c:\bea\wlserver6.1 directory.
    now i want to write a servelt get this file from location given above and give user Save As dialog box.
    can anybody provice me sample code from this....
    thank you.

    Hi,
    Hope the following code snippet helps, Put this in your doGet/doPost method.
    FileInputStream fileInputStream = null;
    ServletOutputStream out = response.getOutputStream();
    String srcfile = "c:\bea\wlserver6.1\myxsl.xsl";
    String destfile = "myxsl.xsl";
    response.setContentType("text/xml");
    response.setHeader("Content-Disposition","attachment; destfile=\""+ filename + "\"");
    try {
         fileInputStream =new FileInputStream(srcfile);
         int i;
         while ((i=fileInputStream.read()) != -1) {
              out.write(i);
    }catch (Exception e){
         System.err.println (e);
    }finally{     
         fileInputStream.close();
         out.close();     
    Good Luck,
    Rajesh

  • BSP Application: Dropdown List box

    Hello Experts,
    I have a drop down list in my BSP Application. I have build the dropdown using internal table.
    <htmlb:dropdownListBox id = "REV_STAT"
    table = "<%= int_stat_typ %>"
    selection = "<%= application->wf_stat_typ %>"
    nameOfKeyColumn = "ZE_REV_STAT"
    nameOfValueColumn = "ZE_REV_STAT_DESC" />
    1. INPROGRESS
    2. SURVEYED
    3 CLEAN UP FINALISED.
    In the page I have a save button. Intially the list is displayed in above order and INPROGRESS Status is visible in dropdown list. I change the status to CLEAN UP FINALISED and save.
    Next time when I return to page according to selection I require to display CLEAN UP FINALISED . Now the page is displaying the INPROGRESS Status not the saved entry.
    The application->wf_stat_typ holds the Key and desc of CLEAN UP FINALISED .
    How can I assign the value CLEAN UP FINALISED to dropdown field and get it displayed when page is displayed?

    Hi Sandeep,
    not sure what you mean by
    The application->wf_stat_typ holds the Key and desc of CLEAN UP FINALISED
    but this field should hold the key only.
    Do a view source in your browser and see exactly what HTML is being rendered.
    Cheers
    Graham Robbo

Maybe you are looking for