You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emmanuel Bridonneau <eb...@cgtime.com> on 2002/04/27 00:32:55 UTC

best way for rendering a collection

hi all,
a collection of beans needs be rendered on a form page. I'd like to
iterate through this collection and display all items (properties and
picture) in a table. Ideally, I'd like to have 3 items displayed per
line hence 3<td> per <tr>.
Obviously, I make no assumptions in the number of items in the
collection. So my question is what is the best way to construct this
layout? I'd appreciate suggestions to replace these ugly schmuggly java
code mixed with HTML ala:

<logic:iterate id="item" name="submitForm" property="goods">
<%
	if (i > 2) {
%>
<tr>
<td colspan="7" align="center" bgcolor="#dddddd"><img
src="../images/shim.gif" width="2" height=2></td>
</tr>
<tr>
<%
	i = 0;
    } else i++;
%>
<td> ....



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>