You know, you're right. I don't know why we list those there since DynaActionForm can support any type. (pause, think.) Hmm, maybe next week I'll find time to fix that. (Patches to docs are welcome!)
Anyway, I think you missed a statement a few paragraphs down the same section: "And, of course, while the DynaActionForm may support various binary types, properties used with the html:text tag should still be String properties." Going back on topic, you can use whatever type you need in DynaActionForm as long as you know what you're doing and you can handle the consequences. Laurie's option 1 is an example of handling it yourself, although now that I think about it, I think FormPropertyConfig is the one that replaces the null with "new Double()" which is where you get your "0.0". Ahh, I'll have to look again to see how you can intercept this. So, bottom line, yes, you can put whatever type in Dyna*Form fields you want. I sometimes put other Dyna*Form objects in them. If you do, though, you'll have to know how to handle them yourself. The default form handle only handles Strings and booleans. Hubert On 3/24/06, fea jabi <[EMAIL PROTECTED]> wrote: > so, I should have all form-properties to be of String type and convert to > Double and then validate is it? > > if that is the case then, why do we have the below data types? what is it's > purpose? > > http://struts.apache.org/struts-action/userGuide/building_controller.html > > The types supported by DynaActionForm include: > > java.math.BigDecimal > java.math.BigInteger > boolean and java.lang.Boolean > byte and java.lang.Byte > char and java.lang.Character > java.lang.Class > double and java.lang.Double > float and java.lang.Float > int and java.lang.Integer > long and java.lang.Long > short and java.lang.Short > java.lang.String > java.sql.Date > java.sql.Time > java.sql.Timestamp > > > Thanks. > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]