> -----Original Message-----
> From: Andrew Close [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 14, 2004 10:09 AM
> To: Struts Users Mailing List
> Subject: Re: More fun with forms...
> 
> 
> i do know what fields will be returned, just not how many.  so i
> wasn't sure if i could use ActionForms or if i had to come up with a
> custom solution.
> i'll see if i can find info on MapBackedForm.
> Thanks Jim

Oh, you mean rows, not columns.  In that case you want a list of objects, where each 
object is a row.  You grab each field from the resultSet, stuff it into a bean, and 
then stuff the bean into a collection.  Then you put the collection in the scope of 
your choice.

> 
> andy
> 
> On Wed, 14 Jul 2004 10:01:05 -0700, Jim Barrows 
> <[EMAIL PROTECTED]> wrote:
> > 
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: Andrew Close [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, July 14, 2004 9:58 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: More fun with forms...
> > >
> > >
> > > Hi all,
> > >
> > > i've looked through a couple articles detailing the use 
> of ActionForm
> > > and DynaActionForm, but i haven't found anything that 
> explains how to
> > > build a dynamic form.  dynamic meaning i don't know how 
> many elements
> > > will be on the form since it will vary based on the amount of data
> > > returned in the query.
> > > example:
> > > i have a table that i'm populating and i would like a 
> comment field to
> > > be editable.  so for each row in the table i will have 
> one editable
> > > field.  i've done this before, but not with Struts.  how 
> do i set up
> > > my ActionForm to handle this?
> > 
> > Map backed form I believe would do this... On the other 
> hand I've never seen a database where I didn't know what 
> fields were being returned.  I know PHP programmers seem to 
> have a tendency to use select *  a lot, which is not 
> something done a lot in Java as far as I have seen.
> > 
> > >
> > > Thanks for your help
> > > andy
> > > 
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to