struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Jouravlev <>
Subject Re: [FORMDEF] Combining FormDef and Struts form definitions
Date Wed, 02 Nov 2005 19:22:27 GMT
On 11/2/05, Hubert Rabago <> wrote:
> On 11/2/05, Michael Jouravlev <> wrote:
> > Hubert,
> >
> > I cannot find if you explained it already, how to combine FormDef and
> > a regular Struts dynaform definitions. In your manual you write only
> > about DynaValidatorForm.
> FormDef can only work with forms defined by FormDef.

That's a pity. See below.

> > Considering your recent patch to DynaActionForm, I would like to
> > define a form with resettable properties, and to use FormDef to link
> > it to business object. How do I do that?
> You can specify the form type:
>     <form-definition>
>         <formset>
>             <form name="myForm"
>                 beanType=""
>                 formType=""/>
>         </formset>
>     </form-definition>

Um, that is not exactly what I asked about. I want to define
resettable properties in struts-config.xml file (or somewhere else, I
don't care where), for example:

<form-bean name="LogonForm"
  <form-property name="username" type="java.lang.String"/>
  <form-property name="password" type="java.lang.String" initial=""

And then to use defined LogonForm bean in FormDef to bind it to
business class or DTO, kind of like in your example:

    <form name="LogonForm" beanType=""/>

Here "name" attribute refers to the form bean that already defined in
struts-config.xml. Or you create another attribute, whatever.

If this is not feasible, would be great if you added support for
resettable properties directly to FormDef. I was just thinking that
combining and reusing is better than redefining.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message