Displaying  list of  items , in  a jsp , using STRUTS--Correct approach

I have a requiremnet tht on click of a button , a list of items should be displayed on a jsp page , so tht a user can select items from tht list.
But the problem is tht , the list is very large(Conatins 1500 record).
So wht approach should i adopt.
One approach is tht , i have a link on my main.jsp , where user has a link (addItems) , and on clicking this link , another page(Items.jsp), opens up , where i dispaly the list of users , and user here can select multiple items , and then those items will be shown in Main.jsp.
Is this appraoch correct,
also plz tell me how can i incorporate previous and next functionality , so tht 20 records per page are shown
Can anyone tell me how 2 go abt it.
I m using STRUTS , and weblogic.

Hiiii
When u want2 add textboxes dynamically,
then declare ur proprerty in action form as of type String[]
<form-bean
name="userForm"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="name" type="java.lang.String[]"/>
<form-bean>
When u add textboxes dynamically , and if the textboxes name is same as that in form bean,
then automatically this form bean property gets populated.
If u require further assistance do tell me

Similar Messages

  • Displaying Hashmap values in JSP using struts taglib

    Please can any one provide me the solution for the below query,
    I have stored hasmap key as string and value as arraylist, can any one suggest how to display the hashmap values(arraylist) in table format in jsp using struts taglib.
                             HashMap hsMap=new HashMap();
                             ArrayList arrList = new ArrayList();
                             arrList.add("filesize");
                             arrList.add("filelength");
                              hsMap.put("filename",arrList);
               In jsp i want to display filename and filesize in table format.

    Read this documentation:
    http://struts.apache.org/struts-doc-1.2.x/userGuide/struts-logic.html#iterate

  • How to assign bean value to a local variable in JSP using struts.

    Hi everybody!
    I've a problem that puzzled me on how to assign a bean value to a local variable like String in JSP using struts.
    we can have someting like this to display the value
    <bean:write name="detailService" property="status" />or
    <bean:define id="theStatus" name="detailService" property="status"/>
         This is country: <%=theStatus%>but an error occured when I tried like this:
    String currentStatus = "<bean:define id="theStatus" name="detailService" property="status"/>";
    or
    String currentStatus = "<bean:write name="detailService" property="status" />";Is there a way to do this?.....
    Any help pretty much appreciated

    Java != JSP.
    The <bean:define> and <bean:write> tags are custom tags meant to appear in the HTML section of a JSP file, as opposed to the scriptlet section. They actually get turned into java code as part of the translation process.
    The <bean:write> tag naturally just writes out what you tell it to.
    The <bean:define> tag defines a local variable, and gives it a value.
    this should do it.
    <bean:define id="theStatus" name="detailService" property="status" type="java.lang.String"/>
    <%
      String currentStatus = theStatus;
    %>With the advent of JSTL, you shouldn't really need to use scriptlet code anymore. Personally I am for 0% scriptlet code in any jsp I write.

  • [b]Data Grid in jsp using Struts [/b]

    I need to develop a data grid in JSP using struts .
    I am using Tomcat web server , Intellij IDEA IDE.
    If any one has code, please sent it.
    Thanks in Advance.

    hi,
    Use Struts-Layout datagrid framework to full fill your needs
    Related Topic link
    here is the clear documentation for your topic
    http://struts.application-servers.com/datagrid/index.html
    here is the download link
    (Struts-Layout datagrid framework)
    http://deltha.uh.cu/java/docs/struts-layout-1.0-docs/download.html
    related discuss
    http://forum.java.sun.com/thread.jspa?threadID=5202989&messageID=9811082

  • Display date in jsp. using struts, JSTL

    want to display today's date in format October 18, 2006
    how to get today's date and how to display it in jsp?
    I am using struts framwork and JSTL tags in my JSP.
    Thanks.

    rizza_99 wrote:
    The page underlines {<fmt:formatDate value="${now}" type="both" dateStyle="long" />} says
    attributte value doesn't accept any expressionsWait, you said "the page underlines"?? So you're using an IDE? Are you sure that it a JSTL problem and not an IDE problem? Ignore the IDE and just execute the code. Does it work without any compilation errors or runtime exceptions? If so, then there's a problem in the IDE.

  • Approaches for Prepopulating dropdowns in Jsp using struts.

    Hi,
    I'm having a functionality working of pre-populating dropdowns using struts like:
    ArrayList list = getRoles(); //This method will return list of roles
    request.setAttribute("roles", list);
    By setting this collection in the request it will be availbel to <html:select and <html:options> tags for pre-populating. My question here is do we need to set the list (that is to be displayed in the JSP) in request scope deliberately, or there are other better approaches as well to do the same, like using expression language and accessing the method directly.
    Thanks,
    Prashant.

    Why dont you use ActionForm.
    declare a private variable
    //variable
    private List roles=null;
    //methods
    public List getRoles();
    public void setRoles(List roles);and in ActionClass
    ArrayList list = getRoles(); //This method will return list of roles
    form.setRoles(list);This collection object will be available in the jsp forwarded from that action in the scope specified in the struts-config.
    then use
    <html:select>
    <html:options collection="roles" labelProperty="name"     property="id" />
    </html:select>

  • Dynamic Textboxes in JSP using struts

    Hi all
    I'm using JSP and Struts framework. I have two buttons Add row and delete row.(not submit buttons) on click i need to either generate or delete a row of textboxes. I able to do the same using javascript but the tag in that case is <input..>(normal HTML) and not <html:text> tag of struts.. Can i use the struts tag in jsp?? I tried but err... So any suggestions?
    A sample code would be of great help.. Im still a beginner in this ocean of Java!
    cya

    If the add/delete row buttons run in javascript, then you have to use the standard <input> tags.
    The struts <html:text> tag is a JSP tag that just generates an <input> at the end of the day anyway (filling in the attributes automatically though)
    As long as you name the controls consistent with what would have been produced by the struts tag, it should work perfectly well.

  • How to display List of items in a outputtext in adf

    Hi ADF Experts,
    My question is I am able to get the selected items from a List<String> on click of a button. How can I display each item as a outputtext inside a panelbox.
    Thanks,
    Rahul

    Rahul,
    Here is a simple ex:
    JSPX :
    <af:panelBox id="pb1">
    <af:forEach var="items" items="#{viewScope.MyBean.stringList}">
    <af:outputText id="ot1" value="#{items}"/>
    </af:forEach>
    </af:panelBox>
    Bean :
    public class MyBean {
    private List<String> stringList;
        public void setStringList(List<String> stringList) {
            this.stringList = stringList;
        public List<String> getStringList() {
            return stringList;
        public MyBean() {
            super();
            stringList = new ArrayList<String>();
            stringList.add("One");
            stringList.add("Two");
            stringList.add("Three");
            stringList.add("Four");
            stringList.add("Five");
    -Arun
    B

  • Accessing American Express site via firefox I get list of items instead of menus - use ie tab loads okay

    When I use firefox to go to american express website instead of images I get following
    Skip to main content
    American Express Logo - link to home
    My Account
    You are under My Account tab
    Card Accounts
    Account Home
    Statements & Activity
    Make a Payment
    Profile & Preferences
    Card Benefits
    Business Accounts
    OPEN Small Business
    Online Merchant Services
    Merchant Site
    American Express @ Work
    Other Accounts
    Savings Accounts and CDs
    Membership Rewards® Point Summary
    Credit Secure
    ID Protect
    Bluebird Checking & Debit Alternative

    '''Try Firefox Safe Mode''' to see if the problem goes away. Safe Mode is a troubleshooting mode, which disables most add-ons.
    ''(If you're not using it, switch to the Default theme.)''
    * You can open Firefox 4.0+ in Safe Mode by holding the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * Or open the Help menu and click on the '''Restart with Add-ons Disabled...''' menu item while Firefox is running.
    ''Once you get the pop-up, just select "'Start in Safe Mode"''
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, and you need to figure out which one. Please follow the [[Troubleshooting extensions and themes]] article for that.
    ''To exit the Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    ''When you figure out what's causing your issues, please let us know. It might help other users who have the same problem.''

  • Multi forms from different action in one jsp using struts?

    In user home page i am using 3 tabs in that 1 tab is for personal , 2 tab is for resume details etc.. but i crated for personal form1 and resumes for form2. when i click in the resume tab i have to show resumes list using same jsp. when click that tab it is showing Null pointer exception. How to solve please help.......

    Read the stacktrace. The 1st line points to the class/method/linenumber where this exception is caused. Lookup this line in your code and fix it accordingly. I.e. either make sure that the object reference in question is NOT null when it is been accessed/invoked, or add a nullcheck on this object reference (e.g. if (object != null) { object.doSomething();} ) so that you can skip the action when it is null.

  • Problem in embedd ing calendar in jsp using struts framework

    hi
    i am working on one application which needs date as ainput and have to store in database. i have embedd one calendar coming in popup but it is working with mozila not in internet explorer. plz give me some suggestion to put this calendar on my jsp.
    thanx
    Gyan

    gyan.poddar wrote:
    but it is working with mozila not in internet explorerSounds like a Javascript problem rather than JSP/Java problem.
    If this Javascript is generated by some JSP tag, then I would report it at the website/forum/mailinglist of the taglibrary in question. If this Javascript is just customized or some other 3rd party script, then either fix it or report it at their own website.

  • How can i display the values in the vector in a jsp using jstl

    in a task i am recieving a vector in a jsp... how can i display those vector values in the jsp using jstl.... plz help me
    thanks in advance

    <%
    here you got vector say; v
    pagecontext.setAttribute("varname",v);
    %>
    <c:forEach var="i" items="${varname}">
    <c:out value="${i}">
    </c:forEach>

  • Displaying content item -(IContentItem) in portlet using Content Server API

    Hi,
    I am using the latest Content server API in my remote server to get the published content items. I have to display the content item in the JSP portlet.
    So how to display the content item in the portlet, if you have the IContentItem Object retrieved from the content server ? Is there any mechanism to get the HTML code/JSP code that corresponds to the IContentItem object?(All the content item will be an html or jsp )
    Currently we are extracting the publish url and opening an http connection to retrieve the html, which is not a good solution if you have mutiple portlets in the same page. So please suggest how can I display the content item (IContentItem Object) in the portlet.?

    Hi Anand,
    I am facing the same problem on IBM WebSphere Portal 5.1.
    Did you find a solution to your problem ?
    Thanks
    Ganesh

  • How to display List of objects in jsp?

    Hi,
    I have a list containing Collection of bean objects.
    Now I want to display the values in the list of objects in a jsp using JSTL.
    Any body help me how to retrieve the bean objects from the List and how can i display that values in the jsp.
    Advanced Thanks,
    Mahendra

    Have you tried to use <:forEach></c:forEach> tag available in jstl?

  • F.M for list of items display

    Hi All,
          I need to give material no and display list of items .
    Thank you,
    Dinesh

    Hi Dinesh,
    Use below function Module :-
    MD_MRP_LIST_API
    If you need reference code, use this for your reference :-
    Parameter: p_matnr like MARC-MATNR,
               p_werks like MARC-WERKS.
    Data: st_MT61D like MT61D,
          st_MDKP  like MDKP,
          int_MDPS TYPE TABLE OF MDPS,
          int_MDEZ TYPE TABLE OF MDEZ,
          int_MDSU TYPE TABLE OF MDSU.
    CALL FUNCTION 'MD_MRP_LIST_API'
      EXPORTING
      PLSCN                          =
        MATNR                          = p_matnr
        WERKS                          = p_werks
      BERID                          =
      AFIBZ                          =
      SINFG                          = 'X'
      LIFNR                          =
      AFHOR                          =
      DTNUM                          =
      INPER                          =
      DISPLAY_LIST_MDPSX             =
      DISPLAY_LIST_MDEZX             =
      DISPLAY_LIST_MDSUX             =
    IMPORTING
       E_MT61D                        = st_MT61D
       E_MDKP                         = st_MDKP
    TABLES
       MDPSX                          = int_MDPS
       MDEZX                          = int_MDEZ
       MDSUX                          = int_MDSU
    EXCEPTIONS
      MRP_LIST_NOT_FOUND             = 1
       MATERIAL_PLANT_NOT_FOUND       = 2
       ERROR                          = 3
       OTHERS                         = 4
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    Regards
    Abhii....

Maybe you are looking for

  • HD tv show won't load onto iPhone4s?

    i downloaded an HD tv show from the iTunes store to my iMac, and was trying to transfer an episode to my iPhone 4s. I received an error message that this phone cannot play the video. Is this correct? I transferred the show to my iPad 3 without any is

  • Windowck-plugin - port of "Window Applets" for Xfce panel

    I'm releasing a new version of  windowck-plugin in collaboration with the original author Alessio Piccoli. Part of this code is based on GNOME Window Applets from  Andrej Belcijan. It's main features are: - Show the title and buttons of the maximized

  • Wish list request-  {tag_classifications} in Web apps list layout

    To be able to use the {tag_classifications} in the Web app list layout, list would allow for advanced filtering i nthe list layout.    

  • I cannot log in to my site on this browser but can on others. It did work but now it does not?

    For some reason after working for months when the home screen of my site appears and I have to log in the page just takes me back to the log in again. I have tried this on other computers using Firefox and the problem is repeated. If I change browser

  • Abapproxy

    hi all ,         i am doing abapproxy to file scenario, when i execute the test interface in abap engine of xi server.           in SXMB_MONI it is showing "scheduled" with green flag.  but it is not showing in the output directory .         wht coul