struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eddie Bush <>
Subject Re: Inheritance of DynaActionForms
Date Thu, 23 Dec 2004 02:59:09 GMT
Hi Vijay,

Comments intermixed.

On Wed, 22 Dec 2004 08:51:16 -0500, Vijay K Dasari
<> wrote:
> Hi,
> I am looking for a "Best practice" of using the ActionForms. We are using
> lot of Forms(both ActionForm and DynaActionForms) in our application. All
> these Forms share some common properties and some validation logic is also
> common.
> Currently we are using the Inheritance in the ActionForms, to solve this
> requirement(Like we have a Super ActionForm and all the other ActionForms
> extend that Super ActionForm).
> I would like to know, is there any possibility with the DynaActionForms. I
> mean, we configure the properties of DynaActionForm in the
> struts-config.xml, is there a possibility that we can say that one
> DynaActionForm extends other DynaActionForm ? (with out replicating the
> properties in all DynaActionForms)
> As the struts-config.xml is an XML file, i guess we can imitate this by
> using the XML INCLUDES( we include the super DynaActionForm properties in
> the child DynaActionForms). Is there any configuration possible in
> struts-config.xml ?

There is, as I said just yesterday, in response to the exact same
question, asked by Amit Gupta, currently no mechanism to facilitate
this.  Yes, you could hack your XML with includes - there's not an
auto-magic way to do it though.

> I wonder what are the advantages of DynaActionForms(whose properties are
> configured in struts-config.xml) over ActionForms(which are Java Classes
> created as JavaBeans) except the creation of extra java classes ?

Primarily, the advantage I see is that you don't have to code multiple
sets of classes (1 for data transfer - 1 to use in your code that has
all the real types).

> Thanks,
> Vijay.

Eddie Bush

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

View raw message