Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: struts and bulk inserts

Laurie Harper

2007-02-27

Replies:

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@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.