You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Wylie van den Akker <na...@personallc.com> on 2004/10/01 23:42:19 UTC
Tiles Defs put problem
OK yall, I'm running into a nasty situation where i have a a content
tile and a navigation tile inside of a layout tile which extends a
layout tile. The problem is im doing some puts inside the various
content tiles that the nav tile cant see when i use tiles:importAttribute.
Here is the tiles code....
<definition name="template.client.myAccount.myAccountLayout"
path="/WEB-INF/jsp/client/memberLayout.jsp">
<put name="content"
value="/WEB-INF/jsp/client/myAccount/myAccountLayout.jsp"/>
<put name="loc" <-- for the main navigation
value="my_account"
type="string"/>
</definition>
<definition name="pages.client.myAccount.myAccount"
extends="template.client.myAccount.myAccountLayout">
<put name="sub_content"
value="/WEB-INF/jsp/client/myAccount/myAccount.jsp"/>
<put name="subloc" <-- for the account navigation
(my nav tile cant see this and java pitches a fit about it)
value="info"
type="string"/>
</definition>
any ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Tiles Defs put problem
Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Wylie,
it's not obvious what you were trying to do with puts inside one tile
that relate to another tile, but what you can try doing as a quick and
dirty experiment is to put a <put name="sub_content" value=""/> in your
parent tile (plus one for subloc).
Inheritance in tiles is not as straight forward as you would think. The
empty value for sub_content will act as a place holder.
Adam
On 10/01/2004 10:42 PM Wylie van den Akker wrote:
> OK yall, I'm running into a nasty situation where i have a a content
> tile and a navigation tile inside of a layout tile which extends a
> layout tile. The problem is im doing some puts inside the various
> content tiles that the nav tile cant see when i use tiles:importAttribute.
>
> Here is the tiles code....
>
> <definition name="template.client.myAccount.myAccountLayout"
> path="/WEB-INF/jsp/client/memberLayout.jsp">
> <put name="content"
> value="/WEB-INF/jsp/client/myAccount/myAccountLayout.jsp"/>
> <put name="loc" <-- for the main navigation
> value="my_account"
> type="string"/>
> </definition>
> <definition name="pages.client.myAccount.myAccount"
> extends="template.client.myAccount.myAccountLayout">
> <put name="sub_content"
> value="/WEB-INF/jsp/client/myAccount/myAccount.jsp"/>
> <put name="subloc" <-- for the account navigation
> (my nav tile cant see this and java pitches a fit about it)
> value="info"
> type="string"/>
> </definition>
>
> any ideas?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org