You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Brian M. Zhang" <bz...@arcturusag.com> on 2002/01/28 21:43:15 UTC
logic:iterate with Struts template
Hi,
I have a jsp page which contains the following logic:iterate:
<logic:iterate id="product" type="com.myCompany.myPackage.Product"
name="productArrayList" >
<tr>
<td><bean:write name="product" property="name" filter="true"/></td>
<td><bean:write name="product" property="desc" filter="true"/></td>
</tr>
</logic:iterate>
productArrayList is a session variable holding an ArrayList object for
com.myCompany.myPackage.Product classs.
This page works just fine when it is by itself. However, when I use it as
part of another page using Struts template, the <logic:iterate /> doesn't
work any more. The template setting is ok as everything works just fine
when the <logic:iterate /> part is removed. Any ideas?
Thanks.
Brian
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: logic:iterate with Struts template
Posted by Bryan Field-Elliot <br...@netmeme.org>.
Consider double-checking that "productArrayList" is in fact a
session-scope object (or request-scope), and not a page-scope object. If
it's page-scope, then it won't be visible to included pages.
On Mon, 2002-01-28 at 13:43, Brian M. Zhang wrote:
Hi,
I have a jsp page which contains the following logic:iterate:
<logic:iterate id="product" type="com.myCompany.myPackage.Product"
name="productArrayList" >
<tr>
<td><bean:write name="product" property="name" filter="true"/></td>
<td><bean:write name="product" property="desc" filter="true"/></td>
</tr>
</logic:iterate>
productArrayList is a session variable holding an ArrayList object for
com.myCompany.myPackage.Product classs.
This page works just fine when it is by itself. However, when I use it as
part of another page using Struts template, the <logic:iterate /> doesn't
work any more. The template setting is ok as everything works just fine
when the <logic:iterate /> part is removed. Any ideas?
Thanks.
Brian
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>