|
Stephen, You really don't need to embed form elements in your loop. I haven't used 1.0.2 in quite a while so I can't give you a 1.0.2 example. What you can do is create an array or some form of Collection on your form (or other bean if you have overidden it) along with a setter that takes an index. For example, you might have a class called OrderDetail that has lineNumber, quantity, and amount properties. Both of these would have get/set like getQuantity(). On your form you might have an ArrayList named orderDetails with a getter/setter. In your JSP, you would refer to the properties as property="orderDetails.lineNumber", etc. You would embed these references in html:hidden, html:text tags, etc. I use the nested tags for this, which are somewhat different than the logic:iterate tags, but from what I remember, your iterate tag sets the name for the detail line tags. David Morris >>> Gibson.Stephen@xxxxxxxxxxxxxx 03/04/03 07:15 AM >>> Hello All, I am using Struts 1.0.2 to display a table using a logic:iterate over an array list in the placed session scope. This works great until I try to imbed a html:form into the logic:iterate to make each row updateable (I need to allow the user to change a value in the table). I am then attempting to use an update button on each row to trigger reloading the arraylist with the user supplied value. The jsp errors out each time I add a form tag inside the <TD></TD> that is defined within the logic:iterate tag. If I create a table with a fixed number of rows (without a logic:iterate) it works fine. I will not be able to do this as a solution as I am loading the results of an SQL query to the table and I will not know how many rows I will need. Has anyone created a table using the logic:iterate tag with updateable fields? I would appreciate some pointers here on how to proceed . Thanks Stephen Gibson Lees Carpets - IT Department A Division of Burlington Industries 3330 West Friendly Avenue Greensboro, NC 27410 Phone 336.379.2728 gibson.stephen@xxxxxxxxxxxxxx
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.