Hi,

I'm struggling with the following problem:
I have a recursive collection of beans that I want to loop trough. So I
have a collections that holds beans. Each of those beans again holds a
collection of beans of the same sort. And so on, recursively.

I was thinking as how to implement this in Struts, and the solution
seemed to me to use templates/tiles. Templates doesn't seem enough by
far, so I choose Tiles. But is it possible in Tiles to transfer beans
from an enclosing page to the enclosed page?

I was thinking something in the lines of

[main.jsp]
<logic:iterate name="myCollection" id="bean">
        <tiles:include template="part.jsp">
                <tiles:put beanName="bean"/>
        </tiles:include>
</logic:iterate>

[part.jsp]
<logic:iterate name="bean" property="subcollection" id="subbean">
        <tiles:include template="part.jsp"/>
                <tiles:put beanName="subbean"/>
        </tiles:include>
</logic:iterate>


If you have another solution for recursive collections of beans, I'd
also love to hear it. I'm really spinning my wheels here for some time
now.

Thanks,
tomK

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

Reply via email to