struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chad Baker <CBA...@mobius.com>
Subject Re: DynaActionForm question / FW: ActionForms and Interfaces
Date Fri, 04 Mar 2005 14:33:38 GMT
This was posted a couple weeks back...

-----Original Message-----
From: Craig McClanahan [mailto:craigmcc@gmail.com] 
Sent: Thursday, February 24, 2005 1:15 PM
To: Struts Users Mailing List; Matthew Hughes
Subject: Re: ActionForms and Interfaces


IIRC, there's some ongoing work to provide an "extends" capability in
DynaActionForm definitions.  In the mean time, though, you can leverage the
fact that struts-config.xml is an XML document, and use XML entities to
encapsulate the common chunks.  Consider:

    <?xml version="1.0" ?>
    <DOCTYPE struts-config ... [
        <!ENTITY shared-props-1  "shared-properties-1.xml">
        <!ENTITY shared-props-2  "shared-properties-2.xml">
    ]>
    <struts-config>
        ...
        <form-bean name="myBean" type="...">
            <form-property>...unique property ...</form-property>
            &shared-props-1;
            &shared-props-2;
        </form-bean>
        <form-bean name="anotherBean" type="...">
            <form-property>...unique property ...</form-property>
            &shared-props-1;
        </form-bean>
        ...
    </struts-config>

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message