struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hubert Rabago <>
Subject Re: [FORMDEF] Combining FormDef and Struts form definitions
Date Wed, 02 Nov 2005 19:33:59 GMT
On 11/2/05, Michael Jouravlev <> wrote:
> 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"
> type="org.apache.struts.validator.DynaValidatorForm">
>   <form-property name="username" type="java.lang.String"/>
>   <form-property name="password" type="java.lang.String" initial=""
> reset="true"/>
> </form-bean>

Well, once Struts supports resettable fields then it'll be supported
by FormDef.  FormDef supports the same attributes that <form-property>
supports.  (Of course, there's no reset yet in struts-config, so there
ain't any yet in formdef.  I'll put it there once we get it into

> And then to use defined LogonForm bean in FormDef to bind it to
> business class or DTO, kind of like in your example:
> <form-definition>
>   <formset>
>     <form name="LogonForm" beanType=""/>
>   </formset>
> </form-definition>
> Here "name" attribute refers to the form bean that already defined in
> struts-config.xml. Or you create another attribute, whatever.

Then you'll define it in FormDef:

<form name="myForm"
    <field property="password" initial="" reset="true"/>

> 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.
> Michael.


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

View raw message