Hi,
   We use this.

                                <logic:iterate id="datalist" name="table1"
indexId="index" offset="1">
                                <%
                                 if ( index.intValue() % 2 ==  0 ){
                                %>
                                        <tr bgcolor="#ffffff"> 
                                            <logic:iterate id="nestedlist"
name="datalist">
                                                        <td
class="11pxtext">&nbsp;<bean:write name="nestedlist"/></td>
                                            </logic:iterate>
                                    </tr>
                                <%
                                } else {
                                %>
                                        <tr bgcolor="#ECF0F7"> 
                                            <logic:iterate id="nestedlist"
name="datalist">
                                                        <td
class="11pxtext">&nbsp;<bean:write name="nestedlist"/></td>
                                            </logic:iterate>
                                        </tr>
                                <%
                                }
                                %>
                                </logic:iterate>
I think that there is a way to check the index value with logic compare
tags.

Mohan

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 07, 2003 8:30 PM
To: [EMAIL PROTECTED]
Subject: Re: Rendering alternate rows of a table in Struts


http://jakarta.apache.org/struts/resources/taglibs.html

At the bottom of the page is RowTag.

David


>Hi All,
>I am using logic iterate tag to iterate over a collection
>and display the contents of the collection in the
>form of a table.
>I want to render the alternate rows with different background colours.
>I don't want to use scriptlet for finding the row number and set the
>colour.
>Is there any Struts tag where I can specify such functionality.
>
>Regards,
>Ritesh.


_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. 
http://join.msn.com/?page=features/junkmail


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