At 9:25 AM -0600 3/23/05, Hubert Rabago wrote: (description of ForwardConfig inheritance -- no comments) followed by:
Now we move to ActionConfig. Should be simple, right? Action mappings are already global within the module. Sure there are subelements, but we should be able to apply what we learned from FormBeanConfig. Ha ha, not so fast. I started inheriting the forwards from another action mapping, then came across this scenario:
<action path="/somePathA" type="SomeAction" name="someForm"> <forward name="baseForward" path="/page1.jsp"/> <forward name="subForward" extends="baseForward" redirect="true"/> </action>
<action path="/someOtherPath" extends="/somePathA"> <forward name="subForward" module="/otherModule"/> </action>
What does /someOtherPath's subForward look like? After some thought, I had the answer: redirect to /otherModule/page1.jsp
We "inherit" the forward definition of the same name from the action, which by that time, should be expanded already. For cases like this, the "extends" tag is also inherited, although in the case above, there was nothing more to inherit.
I disagree with this interpretation. For what it's worth, my assumption would be that any named ForwardConfig in an extended ActionConfig would override, not extend an identically named ForwardConfig in the parent ActionConfig.
Most important is defining the behavior, but I just wanted to point out that your interpretation is counter-intuitive to me.
Once you get started with weird cases, of course, you won't be able to stop:
<action path="/somePath" type="SomeAction" name="someForm"> <forward name="baseForward" path="/page1.jsp"/> <forward name="subForward" extends="baseForward" redirect="true"/> </action>
<action path="/someOtherPath" extends="/somePath"> <forward name="baseForward" path="/page2.jsp"/> <forward name="subForward" module="/otherModule"/> </action>
What does /someOtherPath's subForward look like now? Answer: redirect to /otherModule/page1.jsp. The "extends" was inherited, but by first inheriting /somePath's subForward, the "path" property already had a value, so there was nothing to inherit from /someOtherPath's baseForward.
By my interpretation, the /someOtherPath forward named "subForward" would have no relationship to "/somePath"'s forward named "subForward" I agree that you are being consistent, but just elaborating my earlier interpretation in this case.
<action path="/somePath" type="SomeAction" name="someForm"> <forward name="baseForward" path="/page1.jsp"/> <forward name="subForward" extends="baseForward" module="/otherModuleA"/> </action>
<action path="/someOtherPath" extends="/somePath"> <forward name="baseForward" path="/page2.jsp" module="/otherModuleB" redirect="true"/> </action>
What's the value now for /someOtherPath's subForward? Answer: redirect to /otherModuleA/page1.jsp
I agree with this, in that the inheritance parent of "subForward" is not "/someOtherPath"'s "baseForward".
Not sure when I'll have time to look more carefully at your config or sample app...
Joe
--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "Narrow minds are weapons made for mass destruction" -The Ex
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
