I'm interested to know how you are dynamically persisting these fields?
Certainly not in a RDBMS.  Perhaps this can be resolved with better design.

It almost sounds like someone is shoving this design at you and expecting
you to code it this way.  Is this the case?  If not, there are better ways
to structure your application so you don't have to do such a hack job on the
front-end.



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://struts-atlanta.open-tools.org




> -----Original Message-----
> From: Adrian Cunningham [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 20, 2002 10:14 AM
> To: Struts Users Mailing List
> Subject: RE: Dynamic Forms
>
>
> Hi,
>
> I have checked through almost the entire archive and encountered loads
> of articles covering dynamic forms, but all use the DynaActionForm,
> which requres the properties to specified in the struts-config.xml file.
>
>
> In most cases this is fine but for a few JSP's the property names are
> being dynamically generated at run-time so I can't add them to the
> struts-config file.
>
> Adrian.
>
> >  -----Original Message-----
> > From:       James Holmes <[EMAIL PROTECTED]>@KAINOS
> > Sent:       20 June 2002 14:29
> > To: Struts Users Mailing List
> > Subject:    Re: Dynamic Forms
> >
> >
> > Check the mailing list archives.  This question was
> > answered in the past couple of days.
> >
> > http://www.mail-archive.com/struts-user@jakarta.apache.org
> >
> > -james
> > [EMAIL PROTECTED]
> > http://www.jamesholmes.com/struts/
> >
> >
> > --- Adrian Cunningham <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I am writing a JSP that will contain a dynamic form.
> > >  It basically
> > > consists of a table in which each row contains
> > > various form elements,
> > > the number of rows in the table is variable.  For
> > > example:
> > >
> > > ...
> > >
> > > <%
> > >  for(int i = 0; i < 3; i++)
> > >  {
> > > %>
> > >
> > > <tr>
> > >  <td>
> > >   <html:text property="sTitle<%= i %>_i" />
> > >  </td>
> > >  <td>
> > >   <html:text property="sForname<%= i %>_i" />
> > >  </td>
> > >  <td>
> > >   <html:text property="sSurname<%= i %>_i" />
> > >  </td>
> > > </tr>
> > >
> > > <%
> > >  }
> > > %>
> > >
> > > As you can see from the example I use a for loop to
> > > dynamically create
> > > the rows in the table.  As a result I need to
> > > specify unique names for
> > > each of the properites in the form so I also
> > > dynamically create the
> > > property names.  For this reason I can't use the
> > > ActionForm as it
> > > requires the properties, getters and setters to be
> > > defined.
> > >
> > > I thought the solution to my problem would be
> > > DynaActionForm but again
> > > it requires the properties to be specified in the
> > > struts-config.xml
> > > file, same problem.
> > >
> > > So how can I implement dynamic forms using Struts
> > > without having to
> > > write the form class and defining all my properties,
> > > getters and
> > > setters.
> > >
> > > Any help on this would be greatly appreciated.
> > >
> > > Thanks in advance.
> > >
> > > Adrian Cunningham
> > >
> > >
> > >
> > > --
> > >
> > > This e-mail is confidential and is intended for the
> > > named recipient only. If
> > > you receive it in error please destroy the message
> > > and all copies. Kainos
> > > Software Ltd. does not accept liability for damage
> > > sustained as a result of
> > > malicious software (e.g. viruses). Kainos does not
> > > accept liability for, or
> > > permit; the creation of contracts on its behalf by
> > > e-mail, the publication of
> > > any defamatory statement by its employees by e-mail,
> > > or changes subsequently
> > > made to the original message. The Company's
> > > registered office is located at
> > > 4-6 Upper Crescent, Belfast, BT7 1NT, Northern
> > > Ireland, Tel +44 28 9057 1100.
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! - Official partner of 2002 FIFA World Cup
> > http://fifaworldcup.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> --
>
> This e-mail is confidential and is intended for the named
> recipient only. If
> you receive it in error please destroy the message and all copies. Kainos
> Software Ltd. does not accept liability for damage sustained as a
> result of
> malicious software (e.g. viruses). Kainos does not accept
> liability for, or
> permit; the creation of contracts on its behalf by e-mail, the
> publication of
> any defamatory statement by its employees by e-mail, or changes
> subsequently
> made to the original message. The Company's registered office is
> located at
> 4-6 Upper Crescent, Belfast, BT7 1NT, Northern Ireland, Tel +44
> 28 9057 1100.
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



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

Reply via email to