Hi,
I'm attempting to use Tiles at present.
My layout page looks like this:
<%@ taglib uri="/tags/struts-tiles" prefix="tiles"%> <tiles:insert attribute="content"/>
the page that uses that layout has a bit like this:
<logic:iterate id="loopModule" name="contentModules">
<tiles:insert page="contentmodules/layouts/template_layout.jsp" flush="false">
<tiles:put name="content" value="/pages/cm/contentmodules/text_template.jsp"/>
<tiles:put name="loopModule" beanName="loopModule"/>
<tiles:put name="test" value="hi"/>
</tiles:insert>
</logic:iterate>
the tile itself (as specificed in /text_template.jsp) looks like this
<%@ taglib uri="/tags/struts-bean" prefix="bean" %> <%@ taglib uri="/tags/struts-html" prefix="html" %> <%@ taglib uri="/tags/struts-logic" prefix="logic" %> <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %> <html:form action="/EditGenericContentModuleSubmit" method="POST"> <html:textarea name="loopModule" property="textContent"/> <html:hidden name="loopModule" property="contentModuleId"/> <P> <html:submit value="Save Changes"/> </html:form>
the 'loopModule thing is something I put in the request from an Action. In the page that 'calls' everything loops round my module vector and each iteration of the loop is called loopModule.
I want the tile to render the form based on loopModule's parameters.
It doesn't work as it stands because the loopModule bean is not in the context available to the tile - because the logic:iterate tag puts the 'loopModule' into the page context, not the request or session.
How do I pass the individula loopModule into the tiles context so that the form on the other side can manipulate it?
David
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]