Hello again,
Antonio's solution seemed to work fine to start with, but whenever my 
collection region1Papers contains more than one outageElement, it seems like 
only one of the outageElements is imported into nextPage.jsp. 
The number of iterations are correct, but nextPage.jsp just keeps using the 
same outageElement when doing
<bean:write name="outageElement" property="name"/>

I guess changing flush to "true" in <tiles:insert page="/nextPage.jsp" 
flush="false"/> could help with this, but I keep getting the "illegal to flush 
within a custom tag"-error when doing this.

Anyone having any solution to this?

cheers,
pj

-----Opprinnelig melding-----
Fra: Antonio Petrelli 
Sendt: 3. august 2006 17:39
Til: Struts Users Mailing List
Emne: Re: Exposing an attribute using tiles

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to