You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/09/03 01:41:53 UTC

DO NOT REPLY [Bug 31023] - Action Grouping

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31023>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31023

Action Grouping





------- Additional Comments From niallp@apache.org  2004-09-02 23:41 -------
Something thats been discussed is the idea of having inheritance in the struts-
config, which I think achieves the same goal as what you're proposing.

I don't think theres a bug that covers struts-config inheritance - Bug 22600 
deals with form bean inheritance, but nothing else. If we were to adopt a 
similar approach to Tiles, using an "extends" attribute, adding that to the 
form-bean, forward and action-mapping elements. So for example

 <form-beans>

    <form-bean name="FormA" type="someDynaFormFlavour">
      <form-property name="property_1" type="java.lang.String"/>
      <form-property name="property_2" type="java.lang.String"/>
    </form-bean>

    <form-bean name="FormB" extends="FormA">
      <form-property name="property_2" type="java.lang.Integer"/>
      <form-property name="property_3" type="java.lang.String"/>
    </form-bean>

 </form-beans> 

 <global-forwards>

    <forward name="default"
             className="myPackage.MyForwardConfig"
             redirect="false"
             path="/"/>

    <forward name="myModuleB" extends="default"
             module="myModuleB"
             path="/myModuleB"/>

 </global-forwards> 

 <action-mappings>

    <action path="/initialPathA"
            type="myPackage.ActionA"
            name="FormA"
            scope="request"
            validate="false">
       <forward name="success" extends="default" path="/Abc.jsp"/>
    </action>

    <action path="/submitPathA" extends="/initialPathA"
            validate="true" input="/Abc.jsp">
       <forward name="switch" extends="myModuleB" path="/Def.jsp"/>
    </action>

 </action-mappings>


Niall

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