Inline

> From: Joe Germuska [mailto:[EMAIL PROTECTED]
> 
> At 9:25 AM -0600 3/23/05, Hubert Rabago wrote:
> >
> >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.
> 

Yes, I prefer your interpretation, too.  :)

> Most important is defining the behavior, but I just wanted to point 
> out that your interpretation is counter-intuitive to me.

And as a result, harder to keep track of.  This did concern me, and I
guess it's one of those cases where I was too close to it.  It's also
a reason why I wanted to provide illustrations in this message.

So let's spell this out.  If ActionB extends ActionA, ActionB inherits
all of ActionA's forward definitions.  If ActionB includes a forward
def that has the same name as an ActionA forward, ActionB loses the
ActionA forward with that name and instead starts fresh with the
definition it has.

> 
> >
> >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>
> >
<snip/> 
> 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.
> 

Going by the new interpretation, /someOtherPath's "subForward" would
log an error as it is incomplete.

> >
> ><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

Btw, the sample app link is just a short XML - doesn't really contain
the source.


Hubert

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to