You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raman <ra...@smartdatainc.com> on 2003/11/24 16:44:43 UTC

Logic Iterate problem:

Logic Iterate problem:
    
Can we have nested logic iterates?

e.g. if I want to show list of products under all Categories. how can i implement that?

I am having problem in setting the values of  attributes for inner logic iterate loop

<logic:iterate id="category" name="categorylist">
    <bean:write name="category" property="categoryname"/>
    <logic:iterate id="products" ???? >
       <bean:write name="products"  ???? />        
    </logic:iterate>
</logic:iterate>

I have a bean "catergory" class which has "productlist[]" and "catergoryname" as its properties

Thanks in advance
Raman Garg

Re: Logic Iterate problem:

Posted by Jeff Kyser <kt...@comcast.net>.
Look at the <nested:iterate> tag. Nice

	http://jakarta.apache.org/struts/userGuide/struts-nested.html

-jeff

On Monday, November 24, 2003, at 09:44  AM, Raman wrote:

> Logic Iterate problem:
>
> Can we have nested logic iterates?
>
> e.g. if I want to show list of products under all Categories. how can 
> i implement that?
>
> I am having problem in setting the values of  attributes for inner 
> logic iterate loop
>
> <logic:iterate id="category" name="categorylist">
>     <bean:write name="category" property="categoryname"/>
>     <logic:iterate id="products" ???? >
>        <bean:write name="products"  ???? />
>     </logic:iterate>
> </logic:iterate>
>
> I have a bean "catergory" class which has "productlist[]" and 
> "catergoryname" as its properties
>
> Thanks in advance
> Raman Garg


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