On Friday, Feb 21, 2003, at 14:46 US/Eastern, alexj wrote:

Hi here is the *translation* :

<logic:iterate id="SearchResultBean" name="results" >
   <bean:write name="results" property="title"/>
   <bean:write name="results" property="description"/>
</logic:iterate>

No Alex, the SearchResultBean id should be in the name= part not the name of the results collection.


Alexandre Jaquet
----- Original Message -----
From: "Brian Hart" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 21, 2003 8:36 PM
Subject: Understanding the Iterate Tag


I have a JavaBean Array in the session scope which I can loop through in a
scriptlet to output properties of each member of the array.
Example:
<%
SearchResultBean[] c = (SearchResultBean[]) session.getAttribute("results");

for (int x = 0; x < c.length; x++){
out.println(c[x].getTitle());
out.println(c[x].getDescription());
}
%>

What is the equivalent syntax for the above using the struts <logic:iterate>
tag?

Thank You,
Brian



----------------------------------------------------------------------- -----
----


---------------------------------------------------------------------
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]

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

Reply via email to