tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <antonio.petre...@gmail.com>
Subject Re: EL-Expression in definition ignores page-scope
Date Tue, 11 Oct 2011 09:16:17 GMT
See my modifications inline.

2011/10/11 Kai <kai@ich-geh-kaputt.de>

> <c:forEach var="picture" items="${page.pictures}">
>  <!-- Works only, when I push the variable to request-scope -->
>  <c:set var="picture" scope="request" value="${picture}"/>
>  <li>
>    <!-- other "static" stuff -->
>    <t:insertAttribute name="extralinks" ignore="true"/>
>  </li>
> </c:forEach>
>

<c:forEach var="picture" items="${page.pictures}">
 <li>
   <!-- other "static" stuff -->
   <t:insertAttribute name="extralinks" ignore="true">
     <t:putAttribute name="picture" value="${picture}" />
   </t:insertAttribute>
 </li>
</c:forEach>


> <definition name="browser/index" extends="index">
>  <put-attribute name="robots" value="noindex,nofollow"/>
>  <put-attribute name="content">
>    <definition template="/WEB-INF/templates/**index.jsp">
>      <put-attribute name="fotos">
>        <definition template="/WEB-INF/templates/**fotos.jsp">
>          <put-attribute name="extralinks" cascade="true">
>            <definition template="/WEB-INF/templates/**select.jsp">
>              <put-attribute name="picture" expression="${picture}"/>
>            </definition>
>          </put-attribute>
>        </definition>
>      </put-attribute>
>    </definition>
>  </put-attribute>
> </definition>
>
>
<definition name="browser/index" extends="index">
 <put-attribute name="robots" value="noindex,nofollow"/>
 <put-attribute name="content">
   <definition template="/WEB-INF/templates/**index.jsp">
     <put-attribute name="fotos">
       <definition template="/WEB-INF/templates/**fotos.jsp">
         <put-attribute name="extralinks" cascade="true"
value="/WEB-INF/templates/**select.jsp" />
       </definition>
     </put-attribute>
   </definition>
 </put-attribute>
</definition>

For similar definitions use this pattern.

I suppose that, in select.jsp and similar, you have a t:importAttribute. If
yes, you should not need to change anything there.

Antonio

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message