Sure, I can. And thanks for replying! I've attached the JSP and Form class.
And yes, i thought that i might need indexed properties and did add the index property getter/setter to the Form. but i cannot seem to submit the form with indexed property getter/setter. and by the way, we're using struts 1.0.2. Regards, ATTA ---------------------------------------------------------- JSP ------------------------------------------------------------------- <html:form action="/public/test.do"> <table border="1"> <tr class="tableheader"> <td>Name</td> <td>Category</td> </tr> <% List records = (List) session.getAttribute("records"); %> <% for (int i = 0; i < records.size(); i++) { %> <tr> <td> <%= records.get(i).toString() %> </td> <td> <html:select property="category"> <html:options collection="optionList" property="value" labelProperty="label"/> </html:select> </td> </tr> <% } %> </table> <br> <html:submit /> </html:form> ------------------------------------------------------- END OF JSP ------------------------------------------------------------ ------------------------------------------------------- FORM ------------------------------------------------------------ public class TestForm extends ActionForm { private String[] key = null; private String[] category = null; Vector v = null; public String[] getKey() { List l; Iterator i; return this.key; } public void setKey(String[] key) { this.key = key; } public String[] getCategory() { return this.category; } public void setCategory(String[] category) { this.category = category; } public void reset(ActionMapping arg0, HttpServletRequest arg1) { this.category = null; } } ------------------------------------------------------- END OF FORM ------------------------------------------------------------ ----- Original Message ----- From: "Wendy Smoak" <[EMAIL PROTECTED]> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]> Sent: Thursday, July 24, 2003 10:07 AM Subject: RE: Anyone, Please! A table with column of dropdowns > ATTA wrote: > > Basically I've an HTML table one of its column gives user to > > select Block Type. Block Type is a list of reference values > > that are shown in an html:select element. Now to handle this > > situation I've created String[] getter/setter for block type > > on the Form object. When i submit the form with different block > > types selected in different rows the selected values are correctly > > populated to the Form's block type property. The only problem, > > when page is shown after submission, all the dropdowns have same > > value selected in them! > > Can you post the JSP that renders the many select lists? It sounds like you > need indexed properties to populate several select lists with the same name. > Otherwise, Struts might think that a String[] goes with a single select list > that allows multiple items to be selected. > > -- > Wendy Smoak > Applications Systems Analyst, Sr. > Arizona State University, PA, IRM > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]