On the page: <nested:iterate property="lineItems" id="orderEntryLineItemForm"> <TR> <TD nowrap><nested:hidden property="assetID"/><nested:write property="assetName"/></TD> <TD align=center><nested:text property="stringOrderAmount"/></TD> <TD align=center> <nested:select property="nextTransactionDate"> <nested:options property="nextTransactionDateValues" labelProperty="nextTransactionDateLabels"/> </nested:select> </TD> <TD align=center><nested:checkbox property="markedForRemoval" value="true"/></TD> </TR> </nested:iterate>
Regards, PQ "This Guy Thinks He Knows Everything" "This Guy Thinks He Knows What He Is Doing" -----Original Message----- From: Greg Bearth [mailto:[EMAIL PROTECTED]] Sent: December 31, 2002 1:36 PM To: 'Struts Users Mailing List' Subject: RE: Updating collections of information I'm not sure I understand how I can override reset to solve this issue. Can you elaborate? Do I have to create an empty collection or something? To be clear, this is not the situation where checkboxes must be initialized to false in the reset method. I've already fallen for that one. My issue could simply be a collection of three beans which have String property values "A", "B", "C" respectively (of course in real life the size of the collection is not predetermined and the bean would have more properties). These values are displayed using the logic:iterate tag and the html:text tag (sample, untested code below). My form bean would have getBeanCollection() and setBeanCollection(Collection c) methods. Each bean in the collection has a getString() and setString(String s) methods. Assuming the user changes the three values to "D", "E", "F", how should my action class retrieve the new values? I'd like to call getBeanCollection() on the form bean and have it return a collection of three beans in which the getString method returns "D", "E", "F" respectively, but so far getBeanCollection() returns null. <logic:iterate name="selectedBean" id="element" property="beanCollection" type="xxx.yyy.ElementBean"> <tr> <td align="left"><html:text name="element" property="string"/></td> </tr> </logic:iterate> I appreciate your time and patience. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 31, 2002 10:20 AM To: [EMAIL PROTECTED] Subject: RE: Updating collections of information This is a classic question. You have to override reset in your form to correctly populate all the elements. Regards, PQ "This Guy Thinks He Knows Everything" "This Guy Thinks He Knows What He Is Doing" -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>