Tiles assembles pages using dynamic (runtime) inclusion. The logic:iterate tag 
defines a page scoped attribute under the key specified by the id tag 
attribute. The nextPage.jsp will have it's own pageContext, so the 
outageElement is not visible. Perhaps you could put the outageElement into 
request scope... 

-Adam

-----Original Message-----
From: Per Jørgen Walstrøm [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 03, 2006 11:23 AM
To: Struts Users Mailing List
Subject: Exposing an attribute using tiles

hello list,
I have the following code:

<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"/>

When I run my code, I get the following error:
17:18:42,768 ERROR [Engine] ApplicationDispatcher[/oweb] Servlet.service() for 
servlet jsp threw exception
javax.servlet.jsp.JspException: ServletException in 'nextPage.jsp': No bean 
found under attribute key outageElement

Does anyone know how I could make nextPage.jsp aware of the 'outageElement'? I 
have been experimenting with <tiles:useAttribute> and <tiles:importAttribute>, 
but just can't seem to get it to work...

Any suggestions would be highly appreciated!

cheers,
pj



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-----------------------------------------
The information contained in this message may be privileged,
confidential, and protected from disclosure. If the reader of this
message is not the intended recipient, or any employee or agent
responsible for delivering this message to the intended recipient,
you are hereby notified that any dissemination, distribution, or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately
by replying to the message and deleting it from your computer.

Thank you. Paychex, Inc.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to