Have a look at display tag (http://displaytag.sourceforge.net/11/), once
you've read the docs and put the jars in place it makes handling
multi-column  iterators a lot simpler. For example, displaying three
attributes from objects in a java.util.List called processes where the first
two columns are sortable becomes;

                <display:table name="processes" uid="process"
requestURI="ProcessAdmin.action">
                        <display:column title="Name" sortable="true"
                                <s:property value="#attr.process.name"/>
                        </display:column>                       
                        <display:column title="Description" sortable="true">
                                <s:property
value="#attr.process.description"/>
                        </display:column>
                        <display:column title="Enabledf">
                                <s:property value="#attr.process.enabled"/>
                        </display:column>
                </display:table>

So you could create one List of objects which contain references to the
three objects youy want to display, and iterate through the one list.

Al.

P.S. For those that are wondering, I dropped off the list for a few months
whilst moving house and reading Ians "Starting Struts 2" book in good ol'
fashioned print form :).

-----Original Message-----
From: Rodrigo Pereira [mailto:[EMAIL PROTECTED] 
Sent: 24 December 2007 02:18
To: Struts Users Mailing List
Subject: 3 columns s:iterator

Hi,
is there a simple nice way of displaying a list of objects in a 3 coluns
table? Is there any attribute I can use on s:iterator?
Right now I can only print one at a row or all in one row.

<table>
        
        <s:iterator value="myList" >
                <tr>
                        <td>
                                <s:property value="name"/>
                        </td>
                </tr>
        </s:iterator>
        
</table>

Thanks,
Rodrigo Pereira

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