You can have nested iterate.  I think you can do something like this ... 

<logic:iterate name="items" id="item">

        From <bean:write name="item" property="from" />
        Subject <bean:write name="item" property="subject" />
        In reply to <bean:write name="item" property="inreplyTo" />
        messageId <bean:write name="item" property="messageId" />
        references <bean:write name="item" property="references" />
        Message<br />

        <str:replace replace="NL" with="<br/>NL" carriageToken="NL">
        <bean:write name="item" property="mailcontent" />
        </str:replace>

        Parent : 
        <logic:iterate name="parent" id="p">
                <bean:write name="p" property="parentProp"/>
        </logic:iterate>
</logic:iterate>



-----Original Message-----
From: Rutger Heijmerikx [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 31, 2005 9:47 AM
To: user@struts.apache.org
Subject: Iterate question


Hi all,

Maybe it's clear what my problem exactly is when i post the jsp
contents and my question.

JSP contents:

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/taglibs-string" prefix="str"%>
<html>
<head>
<title>test</title>
<link rel="stylesheet" type="text/css" href="styles/default.css" />
</head>
<BODY>

<logic:iterate name="items" id="item">

>From <bean:write name="item" property="from" />
Subject <bean:write name="item" property="subject" />
In reply to <bean:write name="item" property="inreplyTo" />
messageId <bean:write name="item" property="messageId" />
references <bean:write name="item" property="references" />
Message<br />

<str:replace replace="NL" with="<br/>NL" carriageToken="NL">
<bean:write name="item" property="mailcontent" />
</str:replace>

Parent : <bean:write name="item" property="parent" />
</logic:iterate>

</BODY>
</html>



Now, the problem is, that the bean property "parent" is a new bean
itself. How can i iterate through this bean in the same jsp?

Hopefully you understand my problem, if not i'll be glad to explain it
better.

Rutger

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






------------------------------------------------------------------------------
Notice:  This e-mail message, together with any attachments, contains 
information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station, New 
Jersey, USA 08889), and/or its affiliates (which may be known outside the 
United States as Merck Frosst, Merck Sharp & Dohme or MSD and in Japan, as 
Banyu) that may be confidential, proprietary copyrighted and/or legally 
privileged. It is intended solely for the use of the individual or entity named 
on this message.  If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then delete 
it from your system.
------------------------------------------------------------------------------

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

Reply via email to