On 11/2/05, Michael Jouravlev <[EMAIL PROTECTED]> 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 struts.) > 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="com.my.dto.UserInfoBean"/> > </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" beanType="com.my.dto.UserInfoBean"> <field property="password" initial="" reset="true"/> </form> > 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. Hubert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]