struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Engbers, ir. J.B.O.M." <>
Subject Newbie: java.lang.boolean and DynaActionForm?
Date Wed, 17 Dec 2003 14:24:23 GMT

Both 'Struts in Action' and 'Programming Jakarta Struts' state that
ActionForms and DynaActionForms are nearly equivalent and the main advantage
of using DynaActionForms is that you don't have to declare all the getters
and setters.
In DynaAction Forms each property can be of a (array of a) primitive types.

Thanks to Pedro Salgado and Martin Gainty (see "Retrieving boolean
properties from a DynaActionForm" on december 16), I partially succeeded in
solving the first problem which only confronted me with the next problem :-(
And while looking for a solution to that problem, I found a bugreport
(23355) in which Craig states that 

'Adding these (getInteger, getBoolean etc, Ben) would encourage a behavior
that Struts discourages -- using
non-String data types in a form bean.'

Maybe that this explains why I have only found examples that use
String-properties (which lead me to my first question: where can I find
examples that use non_string properties?) but it leaves me with the more
fundamental question:
Why do DynaActionForms offer the possibility to declare non-String
properties without supporting them?
Should I avoid using DynaActionForms at all and use the DynaValidatorForm?

Ben Engbers

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

View raw message