You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by Kyo Suayan <ks...@yahoo.com> on 2008/01/31 04:59:14 UTC
Correct visibility for definition attribute?
Q: Is this the expected behaviour?
Given a definition like this:
<definition name="main.def"
template="/WEB-INF/layout.jsp">
<put-attribute name="description" value="Page
description here"/>
<put-attribute name="title" value="Document Page
Title"/>
<put-attribute name="banner"
value="/WEB-INF/banner.jsp"/>
</definition>
For some reason, I am only able to access the values
of the attributes I set from the layout template (i.e.
layout.jsp below).
If I use insertAttribute tile tags inside banner.jsp,
the values come out as null.
I understand this must be a very fundamental question
but I appreciate your patience. What i'd like to be
able to do is pull the "description" and "title"
attributes using insertAttribute tags from within
banner.jsp.
Thank you.
-kyo-
.................................................
e-mail: kyo@suayan.com icq:2091387 ym:ksuayan
http://www.suayan.com/kyo san mateo, california
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Re: Correct visibility for definition attribute?
Posted by Antonio Petrelli <an...@gmail.com>.
2008/1/31, Kyo Suayan <ks...@yahoo.com>:
>
> Q: Is this the expected behaviour?
>
> Given a definition like this:
>
> <definition name="main.def"
> template="/WEB-INF/layout.jsp">
> <put-attribute name="description" value="Page
> description here"/>
> <put-attribute name="title" value="Document Page
> Title"/>
> <put-attribute name="banner"
> value="/WEB-INF/banner.jsp"/>
> </definition>
>
> For some reason, I am only able to access the values
> of the attributes I set from the layout template (i.e.
> layout.jsp below).
>
>
> If I use insertAttribute tile tags inside banner.jsp,
> the values come out as null.
>
> I understand this must be a very fundamental question
> but I appreciate your patience. What i'd like to be
> able to do is pull the "description" and "title"
> attributes using insertAttribute tags from within
> banner.jsp.
Yes, this is the expected behaviour. If you need to put an attribute inside
your banner.jsp page, create a new definition and put it instead of "
banner.jsp" itself inside "banner" attribute of "main.def".
Anyway I am working (for Tiles 2.1.x) at a solution to provide "cascaded"
attributes:
https://issues.apache.org/struts/browse/TILES-208
Ciao
Antonio