You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Praveen, Galagali (IE10)" <Pr...@honeywell.com> on 2007/02/27 10:59:59 UTC
struts and bulk inserts
Hi,
I have a scenario where my form can contain large number of rows say 100
(or even more ) and each row contains some fields. There is a save
operation that needs to be done on this data which basically puts as 100
records in database . Since there is only going to be one formbean for a
form how this can be handled ? Is there a smart way where I can insert
all records in one go ?
Thanks in advance,
Praveen
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: struts and bulk inserts
Posted by Laurie Harper <la...@holoweb.net>.
Praveen, Galagali (IE10) wrote:
> Hi,
>
> I have a scenario where my form can contain large number of rows say 100
> (or even more ) and each row contains some fields. There is a save
> operation that needs to be done on this data which basically puts as 100
> records in database . Since there is only going to be one formbean for a
> form how this can be handled ? Is there a smart way where I can insert
> all records in one go ?
I'm not sure what you're looking for guidance on, but perhaps the
following will help. If you have multiple rows, each of which is
composed of the same set of data, you can use indexed properties on your
form bean to capture that data. That takes care of capturing multiple
records with a single form bean.
As to how you then transfer those records into your database, that would
depend on what persistence technology you're using and how your
architecture is set up for transferring data between the view tier and
the backend database.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org