*sigh*  I meant to include the following code snippet before hitting send,
but Outlook had other ideas....
--------------------
<logic-el:iterate name="myList" property="foo" id="foo">
   <c:out value="${foo.description}"/>                   
    <html-el:select property="myField" indexed="true" name="foo">

       <html-el:optionsCollection name="theChoices"  />
    </html-el:select>
</logic-el:iterate> 

-----Original Message-----
From: Brown, Melonie S. - Contractor 
Sent: Tuesday, July 15, 2003 1:52 PM
To: '[EMAIL PROTECTED]'
Subject: Is this really the best way to handle this problem


If you have your properties stored in a List() of
whatever-data-object-i-need-in-the-form-of-a-bean, you need to set the
values of the individual items in the list.  The following works for me (but
I had to make the form session scoped instead of request to make it work)


See http://jakarta.apache.org/struts/faqs/indexedprops.html




-------- Original Message --------
Subject: Is this really the best way to handle this problem
Date: Tue, 15 Jul 2003 19:28:26 +0200
From: Linus Nikander <[EMAIL PROTECTED]>
Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
Organization: baseBeans Engineering
Newsgroups: gmane.comp.jakarta.struts.user

I've been struggling with a problem similar to the one described (and
solved) at
http://www.mail-archive.com/[EMAIL PROTECTED]/msg50901.html .
Is this really the recommended way to solve population / repopulation of
properties stored in a List() of
whatever-data-object-i-need-in-the-form-of-a-bean ? Is there a better way to
acheive the same result ? (I.e represent a collection in a form)

I've read that a practice often used to represent collections (a DB-table
for intstance) is to make a bean that has getters / setters for the
properties of a single row and then have the ActionForm contain a List() of
those beans. One for every row  (in the DB-example). That far I can follow,
and see how / why. But is there no better way to update the values in the
ActionForm (beans) when the data is submitted than in the URL above ?

//Linus Nikander - [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to