Dynamic retrieval in list boxes using JSP

Dear All,
I have a list box in a form which is created by extracting data from oracle database. There are approximately 26000 records which are added dynamically in the list box. There are five rows in the form and each row has to have a list box with all records. Now if i retrieve all records for all list boxes, the page takes high time to load. I also tried using String array to read once and write them using loops in list box. But even then the loading time is quiet high. Is there some better way so that the page loads fast enough. I am using Oracle Database and the table is indexed.
Thanks & Regards,
Gagan Arora

Well, it's big enough to make any page slow... but you can try to load all the list boxes in the client side with javascript.
i make that usually, create a javascript strings array and on the "onLoad" event fill all the list boxes with the values in that array.
but anyway is too much data.

Similar Messages

  • Dynamically create drop down box with JSP

    Hi,
    I hope this is not a repeat post, I have search the forum and a posting has not jumped out at me. I am making a jsp that dynamically constructs a custom SQL query.
    I have a number of text boxes with an id, my jsp page calls a servlet, the servlet reads the contorl id and the value to build the query - this works great. However, there's a large text input box which receives a number of extra conditions - this text box receives the input in the following format:
    searchAttributeName1,searchAttributeValue1;searchAttributeName2,searchAttributeValue2
    This is functional, however, it's a bit rubbish as the user has to know the special recognised attributeNames. What I would like to have is some sort of criteria control. This would consist of a drop down box populated from the servlet, a text input for the value and a button to add another criteria control. so the user could build up the number of query criteria. The drop down box ensures they cannot select the wrong keyword, pressing the add criteria button adds a new drop down box and text box pair to the screen.
    An example of this I recently saw was at Intel's jobs search web site https://jobs.intel.com/jobs/jobs.iccw - see that for example.
    Has anyone got any ideas on how to achieve this? I initially thought use jsp scripting (there is no restriction against this) but I need to use javascript I'm guessing as the button click triggers adding a new combo box. Another idea was to use styles and tables to hide the other drop down boxes but this seems like a real hack that I'd like to avoid. I can do with with .NET i hope java can deliver!
    Any ideas are much appreciated - I am a novice with java web development so please, any examples thoroughly explain (no need to explain populating the drop down box - there seem to be plenty of posts on this).
    Thanks for any help or ideas on this issue -

    Gina,
    Here is some sample code for using a ComboBox in a JSP from an EditCurrentRecord bean. This particular example uses a query, you can also populate combo boxes, list boxes, radio buttons and checkboxes from a static list. See the JavaDocs for the EditCurrentRecord bean.
    <jsp:useBean id="RowEditor" class="oracle.jbo.html.databeans.EditCurrentRecord" scope="request">
    <%
    RowEditor.initialize(application, session , request, response, out, "wt_bc_WT_bcModule.WalkthroughEngineSlidesView");
    RowEditor.setTargetUrl("WalkthroughEngineSlidesView_SubmitInsertForm.jsp");
    RowEditor.createNewRow();
    RowEditor.setReleaseApplicationResources(true);
    RowEditor.useComboBox("Presname","select pres_name,pres_name from wt_info","PRES_NAME","PRES_NAME");
    RowEditor.render();
    %>
    </jsp:useBean>
    null

  • Dynamically refresh a list box in a web report

    Dear All,
    I am having a serious issue with one of my web reports. I am using Oracle 9i PL/SQL Cartridges for developing my web reports. The problem is :
    I have a drop down box for department and also a list box for locations.
    I want to dynamically refresh the locations list box whenever the user selects a department.
    I know I have to refresh the page somehow to get the list box requery from the database.
    Can anyone please send me a sample code or suggest how to do it. I am new to PL/SQL cartridges.
    Thank You

    hello,
    althought his is not a PL/SQL cartridge forum i'll give it a shot.
    the basic behind the solution would be that your procedure need input values that would be used to create this cascading effect. so you would have e.g. input values for region and country for a form that should provide selection fro region country and city.
    when the procedure is called for the first time without any parameters, it would generate a drop down list for the first (region) parameter. when the user selects a value javascript would kick in that would submit the form that basically calls itself, but this time passing the value for the region parameter.
    now the procedure would create two drop down lists (region and country) because it had a value passed for region. both drop down lists would have a javaScript event that would submit the form. the only difference would be that the region list would need to clear the value of the country value before submitting so changing the region would produce a new country list.
    i hope that was clear enough. as for the code example. that is simple javaScript and you can find tons of examples on the Web. just look for "JavaScript" and "OnChange".
    regards,
    philipp

  • 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>

  • How can I display a confirm box using JSP?

    Dear All,
    I am new to the Java language; please help!
    What I'd like to do is to prompt the user, within a loop, to click OK to continue the loop or CANCEL to exit the loop. I've tried to use JavaScript in conjunction w/ Form submittion to handle the parameter passing ('true'/'false') of the confirm box to a JSP. Yet, every form submission will cause the JSP page to re-load from the top which is the incident I'd like to avoid.
    Is there anyway I can have a confirm box written using JSP? Please help!!
    Thanks,Wing.

    if you do any modifications in the jsp page the whole page will be refreshed to show the latest result after modification.
    if you dont want the whole page to be refreshed
    you can pass the control to another page after the confirm box or you can use frames to your interest.

  • HOw to add list box using enhacement of standard infotype

    Hi,
    Using enahancement infotype, I wanted to add a list box field in inftyp 01.
    The module pool ZP000100 & screen no 200 already existed .In the layout editor the field didnot get displayed hence I took it from dictionary.
    I have adde the code in pbo & pai for adding values in list box.
    problem is that data is not getting saved when i enter data in pa30 inftyp 01.
    Kindly guide me.
    Regards,
    Rachel

    *

  • Select item in list box using code

    We use Adobe Workflow v5. I am creating a Check Request application where users type information into various fields and when they click Add, the data is added to a List Box. Also when they click Add, if the current item is >$1,000, a query searches our accounting database to see if the client has outstanding AR older than 90 days. If they do, another list box is displayed with the client name and amount of outstanding AR.
    If that clientnum is already in the second list box, it does not add another one.
    To delete a record from the first list box, the users select the item in the first list box, and then click a Delete button. That deletes the
    record in the first list box.
    I am also trying to delete the record from the second list box but am not sure how to select it using code. As part of the Delete button code, if the currently selected item (the one they want to delete) is >$1,000, I go through each row of the first list box to see if clnum.text (field in the form where the record to be deleted is now displayed) matches the client number in column 4 of any row of the first list box. If it does, I see if the amount of the item in the first list box is >$1000.
    If it is, then I know that there is a corresponding record in the second list box.
    Here is some of the code:
    'go through each row in first list box
    For irow = 1 to lstExp.ListCount
    'set clientnum variable equal to client # in row in first list box
    clientnum = lstExp.RetrieveItem(irow,4)
    'if clientnum variable is equal to client # to be deleted from first list box (selected record - client # in clnum.text now)
    if clientnum = trim(clnum.text) then
    'if amt is >$1,000 in first list box
    if lstExp.RetrieveItem(irow,10) > 1000 then
    'don't delete row because there is another record in first list box
    DeleteOutAR = "N"
    else
    'delete row because there is NOT another record in first list box.
    DeleteOutAR = "Y"
    end if
    end if
    Next
    Here is the code I need help with. I am unsure how to select the record in the second list box so I can delete it.
    if DeleteOutAR = "Y" then
    'go to second list box ?
    form.GoToField(lstOutARUnbilled)
    'start going through second list box looking for clientnum
    For irow2 = 1 to lstOutARUnbilled.ListCount
    if clientnum = lstOutARUnbilled.RetrieveItem(irow2,1) then
    irow2 = lstOutARUnbilled.CurrentSelection
    lstOutARUnbilled.Removeitem (irow2)
    end if
    next
    end if
    So my question is, how can I move to the second list box to actually delete the record?
    Thank you in advance for any help.
    Mary

    Mary-
    The solution could either be quite easy or difficult dependent upon how the data is arranged in the subsequent list box.
    Basically, if there is any sort of corresponding or matching entries, meaning line 1 from list box #1 matches with line 1 of listbox #2, then you would simply execute the following...
    "listbox#2.RemoveItem listbox#1.CurrentSelection"
    Or if you have a column that would contain the same values, say an index, then you could just loop thru the 2nd listbox searching for that index and once found remove the line...
    "listbox#2.RemoveItem nRow"
    , where nRow would be the line that you discovered to have the matching index.

  • Drop Downl list box using model binding

    Hi friends
       I observed one thing that for drop down list box if we set the attribte 'helpValues' using Model Data Binding. Then the list is showing if the search help assigned to field or data element contains only 2 fields.
        For example in SFLIGHT table drop down list box shows for 'CARRID' Field not for 'CONNID' .
        The same problem for get_simple_helpvalues2() method also.
        Is it right ? or Wrong?

    That is a limitation of those methods that I have observed as well.
    Recently I picked through the code of get_simple_helpvalues2.  I am currently using in my Value Help Custom Extension (along with the BAPI for HELP_VALUES).  I wanted something simpler to use than the BAPI, but with more functionality than get_simple_helpvalues2.  I used some of the code from get_simple_helpvalues2 and extended it to support any elementary search help (it works for both CARRID and CONNID).
    I used calls to DD_SHLP_GET_HELPMETHOD and DD_SHLP_GET_HELPVALUES.  The end result is quite a bit of code, but once completed very easy to reuse.  I hope to update the example I have on SDN for Value Help with this additional solution, but I have been quite busy trying to get ready for TechED.  Also I have a few bugs left to work out in my method.

  • 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.

  • List box using ms access db

    hi
    can any body help me. i m trying to make a list box which takes options
    by a ms access database. plz tell me how can i display the db in the list box or combo box.
    thanks in advance

    Something like this:
    <%
    // you need code to get data from database into resultSet() called rs .............
    rs.next(); // move to first record in resultSet()
    %>
    <select name="day">
    <option selected><font face="Arial, Helvetica, sans-serif"><%= rs.getString("yourDbColumn") %></font></option>
    <%
    while rs.next(){  // loop the rest of the records
    %>
    <option><%= rs.getString("yourDbColumn") %></option>
    <%
    } // close the while looop
    %>
    </select>

  • Dynamic modification of select options using JSP

    Is there any way other than reloading the page for the selection of one dropdown to dynamically change the contents of another dropdown?
    ie selecting United States in one drop down will change another dropdown to list all the states

    No there are ways of doing it using javascript. Basically it works like this:
    1) load all data that can appear in the second select box in a large array
    2) the value of the first select box is an index into that array
    3) in the onchange of the first select box, clear the second select box and fill it with new options that you take from the array. Use the value from the first selectbox as the index into that array.
    Check this url:
    http://www.quirksmode.org/js/options.html

  • How to retrieve data (xml file) using jsp

    I am a newbie to xml. I have decided to store my information in the xml file. may I know how can I retrieve my information from the xml file?
    Thanx in advance.

    I am a newbie to xml. I have decided to store my
    information in the xml file. may I know how can I
    retrieve my information from the xml file?
    Thanx in advance.You can get the information from the XML file using one of the parsers available, such as Xerces http://xml.apache.org, and JDOM as an API.
    Using this you have the option of having a SAXParser or a DOMParser.
    SAX (Simple API for XML) is an event based parser, so if you know the XML structure, and need to find a certain element, you can just look for the element name,and retrieve the value of the element, it's attributes and its children.
    DOM(Document Object Model)represents the XML as a tree, but uses more resources as it stores the entire tree in memory. But it is good in that you can traverse the whole tree.
    JDOM would be a good idea too. If you download this, you can use it's API, which is very good, that will use the parser on your system (Xerces). I would definately recommend JDOM.

  • Getting multiple values from a list box

    Hi,
    I am not able to get multiple selected values from a list box using the getParameterValues(). I used the following code..
    String[] names=request.getParameterValues("lname");
    can anyone tell me what the error is or is there any other way i can get multiple selected values from a list box.
    Thanks
    Satish

    Fragment 1
    This is the JSP Code am using for testing
    <%
    String[] name =request.getParameterValues("D1");
    if(name.length==1)
    String value=name[0];
    Instead of name.lenght==1 try with name!=null
    Fragment 2
    out.println(value);
    replace the above fragment with
    %>
       <%-- print result -->
       <%=name[0]%>
    <%
    Fragment 3
    else
    %>
    The list box D1 is a multiple select list box.
    If it still doesn't work, check that the checkboxes have the same name as well as different values
    <input type="checkbox" name="D1" value="1">
    <input type="checkbox" name="D1" value="2">I hope this helps :-)
    Good luck
    touco
    ps: i want duke

  • List box in screen painter

    Hi
    I have created a screen in menu painter in which there are 3 drop down listbox .
    Each list box field has a domain created for it and the domain is assigned a value table.
    the value table contains data that data should be populated to list box.
    Now when i excecute the screen i am not able to select any data.
    any idea how can i achieve this

    Hi,
    I believe you have to manually fill up the list box using the function module VRM_SET_VALUES..
    Check this example...
    TYPE-POOLS: vrm.
    PARAMETERS: p_test TYPE char4 AS LISTBOX VISIBLE LENGTH 10.
    DATA: t_data TYPE vrm_values.
    INITIALIZATION.
    DATA: s_data TYPE vrm_value.
    s_data-key = 'ABCD'.
    s_data-text = 'First four'.
    APPEND s_data TO t_data.
    s_data-key = 'EFGHI'.
    s_data-text = 'Second four'.
    APPEND s_data TO t_data.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    id = 'P_TEST'
    values = t_data
    EXCEPTIONS
    id_illegal_name = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    START-OF-SELECTION.
    WRITE: / p_test.
    Thanks,
    Naren

  • Can I disbale a list box?

    Can I disbale a list box in JSP.
    I want to have a list box disabled if the user is not form a certain place.
    So the user will choose their country from a list box and then depending on where they are from another list box will either be disabled or enabled?

    Something like this?
    <%   if( ! userIsFromWroungCountry() ) {&>
    <!-- HTML Code for listbox goes here -->
    <% } %>Since I don't know how you check from which country the user is, I just added a psuedo-method in the if-statement. I take it you know how to check that.
    /J

Maybe you are looking for

  • Video Cameras that work with Mac software...

    I am a new Mac user (3 months and still learning) and My wife is a photo freak. She is wanting to get a new camcorder and start editing some of the footage she gets. Which camcorders out there have people had success with on the Mac??? We currently h

  • BAPI to pull IT0016 CONTRACT details

    hi all, i need to pull details of contact elements using a BAPI,the bapi BAPI_HRMASTER_SAVE_REPL_MULT cannot give me that output. any ideas are appreciated?? thanks in advance!

  • HT201272 I need to re download a rented movie I had to delete it before watching.  How can I re download it?

    I need to redowload a rented movie I haven't watched yet.  I purchased it about 10 days ago but I to delete it to make room for something else.  I can't find a place to redowload it.  Please help.... thanks

  • Cloning : hot cloning and cold cloning

    hi how to clone in EBS R12.I am a core DBA student currenly working as trainee in EBS dba. can anyone explain .... i am requesting some details on hot cloning , cold cloning and user managed cloning techniques. in user managed cloning i need to run a

  • Passing data from page to page

    Hello, Firstly i will describe my website structure: On the first page i show two objects: table1 and textInput1. Table1 shows the list of data, and textInput1 - current row value. On the second page i show three objects: table2, textInput2 (does the