On Jan 31, 2006, at 8:09 AM, Antonio Petrelli wrote:

Does a definition such as this have sense?

<definition name="myName" extends="myExtends" path="path.jsp">

I've personally never had a situation like this where I extend a tile and redefine the path at the same time. I've always extended a tile definition and overridden only the attributes. But I can see merit to the approach. If the framework does not currently support it, it probably should.

 <definition name="page.index" path="/layout/classic_layout.jsp">
   <put name="top" value="/tiles/top.jsp"/>
   <put name="left" value="/tiles/fourth.jsp"/>
   <put name="body" value="/tiles/login.jsp" />
 </definition>


The second file contains:

<definition name="page.index.bug" path="/layout/ three_rows_layout.jsp" />
 <definition name="page.index" extends="page.index.bug">
   <put name="top" value="/tiles/top_pda.jsp"/>
   <put name="left" value="/tiles/fourth.jsp"/>
   <put name="body" value="/tiles/login.jsp" />
 </definition>

To make sure I have this straight: You have "page.index" defined twice in 2 different files? Why not do something like this?

First file:
 <definition name="page.index" path="/layout/classic_layout.jsp">
   <put name="top" value="/tiles/top.jsp"/>
   <put name="left" value="/tiles/fourth.jsp"/>
   <put name="body" value="/tiles/login.jsp" />
 </definition>

2nd file:
<definition name="page.index.bug" path="/layout/ three_rows_layout.jsp" extends="page.index" />

Is it a requirement that you always reference "page.index" but get different definitions in different contexts or can you reference "page.index.bug" when you want the 3 row layout?

When I use XmlDefinitionSet.extend method, the "page.index" definition has both the "extends" (in fact "inherit") and "path" attributes! After doing "resolveInheritances" it does not solve the problem. I think the (possible) bug is in XmlDefinition.overload, where the attributes are simply copied and not checked.

That's definitely a possibility.  Can you verify it?

Thanks,
Greg


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

Reply via email to