Handling List box element in JSP

Hi,
I have a List box which gets populated on the client side, depending on the user's activity on a form, when i finally submit the form, i want the list box with all the values to go to the server, Can anyone help me with the code on the server-side (JSP Scriplet) about how i can do this?
Thanks
Varadaraj

Assuming that by list box, you mean an HTML element using <select ...> tag,...
Only the currently selected values get submitted to the server. If thatis where you got kind of stuck.

Similar Messages

  • Handling list box in alv

    hai all
    please check the code and tell how i can call in both open and close sales orders
    NAME = 'CATEGORY'.
      VALUE-KEY = 'OPEN'.
      VALUE-TEXT = 'OPEN'.
      APPEND VALUE TO LIST.
      VALUE-KEY = 'CLOSE'.
      VALUE-TEXT = 'CLOSE'.
      APPEND VALUE TO LIST.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID     = NAME
          VALUES = LIST.

    Reported to SCN Moderators for multiple postings:
    handling list box in alv
    The specified item was not found.
    pk

  • How to access list box variable in jsp

    hi.......I'm new to jsp ...pls help me with the following.....i've created a form with some list boxes ,text boxes and radio buttons.....now i need to access the variables of these elements in order to validate and display them.....what is the syntax in jsp for accessing the list box variable(or txt box or radio button)
    tnx in advance.....

    You normally use a Servlet class for this. You can get request parameters by HttpServletRequest#getParameter() or #getParameterValues() then.
    This is fairly trivial though. Please go through a decent JSP/Servlet book/tutorial first.

  • Cannot display Thai. character in List box elements

    Hi all,
    I have set the Fonts to Ms San Serif to all items in a form, all items seems can display Thai. character correctly. For List box, it can display Thai also, but the elements in the selections cannot.
    Does any expert know how to fix this ?
    Thanks!

    Hi Kinghow,
    Thanks for your reply!
    The problem still can't solve after set the auto csv code select "Yes". The excel file still can't display Thai character.
    Am i using a correct way to generate excel file? Do you have any suggestion to export data to excel using pl/sql?
    If i removed below part, then the excel file working well.
    htp.tableOpen(cattributes=>'border="1",bordercolor="BLACK",align="CENTER"');
    for x in (select srd_line_prop,srd_line_dtl from schd_rptd where srd_queue_no=:P401031_QUEUE_NO and srd_line_prop='H' order by srd_queue_no,srd_line_no)
    loop
    htp.tablerowopen(cattributes => 'bgcolor="#81F7F3"');
    for i in 1..pkg_wwe.split_count(x.srd_line_dtl,'|') loop
    if i = 1 then
    htp.p('<TD nowrap align="center" width="70px" > <font size="2" face="arial" color="#088A08">');
    htp.p(pkg_wwe.split(x.srd_line_dtl,'|',i));htp.p(' ');htp.p(' ');
    htp.p('</TD>');
    else
    htp.p('<TD nowrap align="center" width="70px" > <font size="2" face="arial" color="#08088A">');
    htp.p(pkg_wwe.split(x.srd_line_dtl,'|',i));htp.p(' ');htp.p(' ');
    htp.p('</TD>');
    end if;
    end loop;
    htp.tableRowClose;
    end loop;
    htp.tableClose;
    I really do not have any idea on how to solve this problem. Is really strange on this problem.

  • List Box-passing value from one jsp to another

    I have a list box in a .jsp.
    <SELECT name="name">
    <option value ="Fred">Fred
    <option value ="Michael">Michael
    </select>
    <input type="submit"
         value="Names">
    I need to send the name to another .jsp. I don't know how to receive it or send it. I am using form method="post". I need to use the name selected in a query in my next .jsp, so I can select all the data in that has that name in it. I am connecting to a database on the iseries. Do I have to use submit or can I use something else? I wanted to use a link like this.
    <dt valign="left"><img src="bullet1.gif">
    Volunteer</dt>
    of course that didn't work.
    Thanks

    I got it! Never mind!

  • Populate List Box

    Hi,
              I am new to Weblogic 8.1 and was with .NET for last couple of years. I need to populate a list box in my jsp page. I have a database control method that returns a String array and this should be shown in the list box. I would like to know what is the efficient way to do this in 8.1.
              Thank you
              Jik

    You have 2 choices, you can do all of the database work, and return all this to the web page, and make javascript repopulate all of the listboxes on the fly (faster for small datasets, ridiculous for large ones) , or otherwise you'll have to do another round trip to the server. You don't need to use javascript to do this, just resubmit and get the jsp to revalutae the values in the list boxes

  • Please help !!!! How to get data into dropdown list box

    Hi all,
    I want to display data from ResultSet object to drop down
    list box in my JSP form.
    How should I proceed ?
    Please help me what should I do ?
    Thanks for any help in advance.
    savdeep.

    dear hermione
    it depends on the compexity of the application
    i could also have suggested to use a JSP custom tag
    that can populate the values stored in a table. I
    guess u must have used that approach too.
    But why to make the things complicated when they can
    be done in an easier manner.
    The author seems to be a beginner and telling him to
    call Helper classes just to make a drop down is not
    at all feasible.
    what do u say?I believe it is best to start with a proper approach than finding quick solutions. Of course, JSTL sql tags allow you to execute queries within the JSP but they look cleaner in code.
    Certainly, if the OP is a beginner in JSP (presuming that he has some background of core Java and OOP), I don't see any reason why there should not be a separate class with a well-defined responsibility. This will help the OP develop a thinking towards designing a good solution rather than simply patching in bits of procedural code to get the job done. There is a difference in doing something and doing in properly. :)
    I suppose I am a little wary since I have been working too long maintaining code developed by others. A simple change in the requirement needs a lot of impact on several components.

  • Creating List box

    Hello every body,
    I would like to develop one webapplication.In that i need to create one empty list box .Could u plz tell me how we have to create that list box in my jsp page.
    thanks in advance

    <logic:empty name="myForm" property="list">
                                                           <html:select property="list1" style="width: 150px" size="5">
                                                           <option value=""></option>
                                                           </html:select>
                                                 </logic:empty>                                                       
                                                      <logic:notEmpty name="myForm" property="list">
                                                      <html:select property="list1" style="width: 150px" size="5" onchange="return something(event);">
                                                           <html:optionsCollection property="list" value="id" label="name" />
                                                      </html:select>
                                                      </logic:notEmpty>

  • Equalising the size of List boxes

    Hi all
    I have 6 list boxes in a jsp page
    The sizes of these boxes will change depending upon the content
    If length of one item in the list box happens to big then the width of the list boxes
    will increase.
    I want to maintain the consitent size of all the list boxes.
    Pls let me know
    I am using the strus frame work
    and i am using the tab <html:select>
    Regards
    Raj

    You can do something with DHML but this does not work in netscape. Depends on what you are looking for.

  • Handling of list boxes

    Hi All!
    I am developing a web application for my organization. in one of the forms i have a list box where the user can select multiple entries from the listbox. now, i need to handle this situation in the next JSP page where the user is redirected to.
    to make my problem more clear, i am providing a sample code of what i have and what i want:
    Code on Page 1:
    <form name=frm1 action=page2.jsp>
    <select name=xyz multiple=true>
    <option value = "1">ABC
    <option value = "2">CDE
    </select>
    <input type=submit>
    </form>
    Now my problem is how do i access the multiple selections that may have been made by the user.
    Please Help! ITS URGENT!!!!
    Thanx in advance,
    Rajat Aggarwal

    When a multiple select box submits, it submits multiple name/value pairs.
    eg
    submit.jsp?xyz=1&xyz=2
    You use
    request.getParameter("xyz") only retrieves one value.
    request.getParameterVales("xyz") retrieves an array of them.
    String[] selectedOptions = request.getParameterValues("xyz");

  • Dynamic Creation of list box on excel sheet and handling events

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

    hi all ,
    i m working on excel to sap integration application and for that i need to create dynmicaly list boxes in excel and also needs to handler events of each boxes..
    please suggest me somehting asap/
    thanks in advance,
    jigs
    helpful ans will be rewarded.

  • How to add more elements in the list box bean

    Hi,
    I have created a list box bean on a seeded page. I have an array of 573 elements.
    When I tried to add all those values in my list box, only 251 of those values got inserted in it.
    Please suggest me how can I insert all the 573 values in that list box.
    Regards,
    Gaurav.

    Thanks Gyan.
    Below is the code for creating list box :
    OAApplicationModule am = pageContext.getRootApplicationModule();
    OAViewObject listVO=(OAViewObject)am.findViewObject("LocationsLOVVO");
    OAWebBeanFactory list1 = pageContext.getWebBeanFactory();
    OADefaultListBean list = (OADefaultListBean)list1.createWebBean(pageContext, OAWebBeanConstants.DEFAULT_LIST_BEAN, null, "LocationsList");
    list.setListViewObjectDefinitionName("oracle.apps.irc.lov.server.LocationsLOVVO");
    list.setListValueAttribute("LocationCode");
    list.setListDisplayAttribute("LocationCode");
    list.setSize(6);
    list.setMultiple(true);
    list.setName("Location");
    OAMessageLayoutBean listboxbean = (OAMessageLayoutBean)webBean.findChildRecursive("AplmessageLayout");
    listboxbean.addIndexedChild(list);
    But it is not inserting all the location values in the list.
    Regards,
    Gaurav.

  • Adding element in a List box

    How do we add an element to an existing List box in swings?

    Read this section from the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/list.html]How to Use Lists.

  • List box at jsp

    <select name="Action">
    <option value="Display">Display Info</option>
    <option value="Delete">Delete Info</option>
    <option value="Display">Update Info</option>
    </select>
    above is my option for my list box. how do i write a jsp coding to tell that i have selected the 1st option or so on. i wan my button react and direct to respective pages according to th eoption the user use.
    thanks!

    can anyone help me in his java script statement. if option 0 is selectef i wan the page to navigate to main.html. can u tel me the correct coding as mine is not working. thanks!!
    <SCRIPT>
    function Check(){
    if(document.ACTION.ActionSelect.selectedIndex==0){
    </SCRIPT>
    <INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="SUBMIT" onClick="main.html">
    <SCRIPT>
    </SCRIPT>
    <table>
    <tr>
    <td width="200">Transaction:</td>
    <td width="200">Sort by:</td>               
    </tr>
    <tr>
    <td width="200">
    <select name="ActionSelect" onBlur="Check();">
         <option value="Display">Display Info</option>
         <option value="Delete">Logout</option>
    </select>
    </td>
    <td width="200"><input type="text" name="sort"></td>
    </tr>
    </table>

  • Handle  text  using list box in dialog program

    hi,
      I am  working  on  dialog program  , Created  two fileds , one is list  box type  I/O field and another is  i/O  field  which displays  text  based  on  value  selected in list box.
    Please  provide  any  inf  how  to Handle  text  using list box value in dialog program.
    thanks

    Hi,
    <li>Check the screen to know how to set I/O field to set as listbox.[ dropdown box picture|http://2.bp.blogspot.com/_O5f8iAlgdNQ/Sm7RBrqfjcI/AAAAAAAAFaU/RateViiVqrU/s1600-h/drop_down-754481.JPG]
    <li>in the above screen we need to set FctCode  for the dropdown box field so that when you select value from the dropdown box PAI event is triggered.
    <li>screen flow logic like below
    PROCESS BEFORE OUTPUT.
    MODULE values_into_dropdown.
    FIELD g_bukrs.
    FIELD g_text.
    PROCESS AFTER INPUT.
    FIELD g_bukrs.
    FIELD g_text MODULE get_bukrs_txt.
    <li>Logic to fill Dropdown field with values.
      PROGRAM  sapmztest_dropdown.
    DATA: g_bukrs TYPE t001-bukrs.
    *&      Module  VALUES_INTO_DROPDOWN  OUTPUT
    MODULE values_into_dropdown OUTPUT.
    TYPE-POOLS:vrm.
    DATA:
           field     TYPE  vrm_id,
           it_values TYPE  vrm_values,
           wa_values LIKE LINE OF it_values.
    DATA: t001 TYPE t001 OCCURS 0 WITH HEADER LINE.
    IF it_values[] Is INITIAL.
       SELECT * FROM t001 INTO TABLE t001 UP TO 10 ROWS.
       LOOP AT t001.
         wa_values-key  = t001-bukrs.
         wa_values-text = t001-butxt.
         APPEND wa_values TO it_values.
         CLEAR  wa_values.
       ENDLOOP.
    ENDIF.
    field = 'G_BUKRS'.
    CALL FUNCTION 'VRM_SET_VALUES'
       EXPORTING
         ID     = FIELD
         values = it_values.
    ENDMODULE.                 " VALUES_INTO_DROPDOWN  OUTPUT
    *&      Module  get_bukrs_txt  INPUT
    MODULE get_bukrs_txt INPUT.
    read table it_t100 into wa_t100 with key bukrs = g_bukrs.
    g_text = t001-butxt.
    ENDMODULE.                 " VALUES_INTO_DROPDOWN  INPUT
    I hope that it helps you.
    Thanks
    Venkat.O

Maybe you are looking for