struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <brenmcgu...@tariffenet.it>
Subject Re: Exposing an attribute using tiles
Date Thu, 03 Aug 2006 15:39:01 GMT
Per Jørgen Walstrøm ha scritto:
> <tiles:insert definition="myLayout">
>    <tiles:put name="body" type="string">
>       <logic:iterate id="outageElement" name="searchForm" property="region1Papers">
>          <tiles:insert page="/nextPage.jsp" flush="false"/>
>       </logic:iterate>
>    </tiles:put>
> </tiles:insert>
>
> and my nextPage.jsp contains this:
> <bean:write name="outageElement" property="name"/>
>   

Beans are not passed automatically to a tile, but they can be passed as 
attributes.

Rewrite the first piece this way:

<tiles:insert definition="myLayout">
   <tiles:put name="body" type="string">
      <logic:iterate id="outageElement" name="searchForm" property="region1Papers">
         <tiles:insert page="/nextPage.jsp" flush="false">
           <tiles:put name="outageElement" beanName="outageElement" />
         </tiles:insert>
      </logic:iterate>
   </tiles:put>
</tiles:insert>


And your nextpage.jsp will be:

<tiles:insert attribute="outageElement" />
<tiles:importAttribute name="outageElement" />

<bean:write name="outageElement" property="name"/>


HTH
Antonio


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message