Hi.
We use XDoclet to generate our EJB's (CMP). There is also a tag to generate
the struts form. With XDoclet you describe your bean with javadoc
commentarys:
* @ejb:bean type="CMP"
* name="TelekomVerbindung"
* view-type="local"
* use-soft-locking="true"
* cmp-version="2.x"
* primkey-field="id"
*
* @ejb:transaction type="Required"
*
* @ejb:interface
* local-class="de.neusta.fortuna.ejb.standort.TelekomVerbindungLocal"
* local-extends="de.neusta.fortuna.ejb.base.FortunaBaseEntLocal"
*
* @jboss:table-name "ST_TELEKOMMUNIKATION"
* @jboss:create-table "${jboss.create.table}"
* @jboss:remove-table "${jboss.remove.table}"
* @jboss:tuned-updates "${jboss.tuned.updates}"
* @jboss:read-only "${jboss.read.only}"
*
* @struts:form
* name="TelekomVerbindung"
*/
You see the last two rows are the declaration for the struts form. In this
case XDoclet generates a struts form with all bean-attributes. Nice isn't
it.
Greetings
Manfred
-----Ursprungliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im
Auftrag von [EMAIL PROTECTED]
Gesendet: Montag, 8. Juli 2002 09:26
An: Struts Users Mailing List
Betreff: Re: dynamicaly generated forms and ActionForms
Did somebody have a starting point to deal whith this use case?
Gilles Vandaele
"Craig R.
McClanahan" To: Struts Users Mailing List
<[EMAIL PROTECTED]
<[EMAIL PROTECTED]>
> cc:
Subject: Re: dynamicaly
generated forms and ActionForms
05/07/2002 20:06
Please respond to Struts Users
Mailing List
On Fri, 5 Jul 2002 [EMAIL PROTECTED] wrote:
> Date: Fri, 05 Jul 2002 15:39:41 +0200
> From: [EMAIL PROTECTED]
> Reply-To: Struts Users Mailing List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: dynamicaly generated forms and ActionForms
>
> I need to dynamicaly generate a jsp form and retrieve values in a bean.
The
> elements of the form must be generated based on a glossary (xml shema)
and
> on values retrieved from a database (labels, layout, default value,
> javascript validation, ActionForm validation,...).
>
> Is DynaActionForm the right solution, how can I use it, can I find an
> example?
> Is it a good way to give the same mane to all the elements and use a
> property (same mame) of type Array to get the values automatically.
>
The standard implementation of DynaActionForm is not going to help you
deal with this use case. It still expects the set of properties for a
particular form bean to be declared in the struts-config.xml file at
application startup time.
Supporting this more general notion of dynamic forms would be a very
popular enhancement. However, it's a little late to try to get this into
a 1.1 final release, so standard support will have to wait for some future
version.
>
> There must be someone already gone through.
>
>
>
>
> Gilles Vandaele
>
Craig
--
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]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>