I think you can add a bean define for the link and use it directly in a '<a
href=...' tag, such as;



<tiles:importAttribute/>

<logic:iterate name="items" id="item"/>
<logic:iterate name="links" id="link"/>

<!-- ===== link scripting var ===== -->
<bean:define id="linkName" name="link" property="pathToLink"
type="java.lang.String"/>

<a href="<%=linkName%>"><bean:write name="item"
property="someProperty"/></a>
<!-- ===== -->

</logic:iterate>
</logic:iterate>




-----Original Message-----
From: e [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 20, 2003 4:58 PM
To: Struts Users Mailing List
Subject: iterating through lists in tiles



I am trying to create a list of links using items from a putList in tiles.

The end result would be:
<a href="link">item</a>
<a href="link">item</a>

How do I iterate through both link and item in parallel, so to speak?
i.e. how do I modify the code below to get the result I want?

<tiles:importAttribute/>

<logic:iterate name="items" id="item"/>
<logic:iterate name="links" id="link"/>

<html:link page="<bean:write name="link"/>"><bean:write
name="item"/></html:link>

</logic:iterate>
</logic:iterate>


Thanks.

-eva


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




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

Reply via email to