struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brown, Melonie S. - Contractor" <Melonie.Br...@forscom.army.mil>
Subject Is this really the best way to handle this problem
Date Tue, 15 Jul 2003 17:52:21 GMT
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 <linus@nikander.net>
Reply-To: Struts Users Mailing List <struts-user@jakarta.apache.org>
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/struts-user@jakarta.apache.org/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 - linus@nikander.net

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message