Hi this solution is also good. It is same like I told you to in action
class. Some where you have made a decision like this. 

-ni3

-----Original Message-----
From: David Whipple [mailto:[EMAIL PROTECTED] 
Sent: 09 June 2005 15:03
To: Struts Users Mailing List
Subject: RE: Toggle Colors between Rows

We do the following in our jsp.  We have two styles defined in our style
sheet, tbl1 and tbl2 for the two different row types:

   <c:forEach var="user" items="${userList}" varStatus="lineInfo">
      <c:choose>
         <c:when test="${lineInfo.count % 2 == 0}">
            <c:set var="cls" value="tbl2"/>
         </c:when>
         <c:otherwise>
            <c:set var="cls" value="tbl1"/>
         </c:otherwise>
      </c:choose>

      <tr align="left" class="<c:out value="${cls}"/>" valign="top">
         <td width="5%" align="center">

            blah...

         </td>
      </tr>
   </c:forEach>




 

             "Ray Madigan"

             <[EMAIL PROTECTED]

             >
To 
                                       "Struts Users Mailing List"

             06/09/2005 09:52          <user@struts.apache.org>

             AM
cc 
 

 
Subject 
             Please respond to         RE: Toggle Colors between Rows

               "Struts Users

               Mailing List"

             <[EMAIL PROTECTED]

                  he.org>

 

 





I have a tag that I got from somewhere that allows you to set the even
element class and the odd element class.  It works great for me, if you
want
it, let me know and I will email it to you.

Thanks

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 09, 2005 5:01 AM
To: user@struts.apache.org
Subject: Toggle Colors between Rows



What is the best way to toggle colors between rows using logic:iterate
keeping in mind the View (MVC....no scriptlets!!) best practice.?

Amitava Basak
ASE
Tata Consultancy Services Limited
Mailto: [EMAIL PROTECTED]
Website: http://www.tcs.com

Notice: The information contained in this e-mail message and/or
attachments
to it may contain confidential or privileged information.   If you are
not
the intended recipient, any dissemination, use, review, distribution,
printing or copying of the information contained in this e-mail message
and/or attachments to it are strictly prohibited.   If you have received
this communication in error, please notify us by reply e-mail or
telephone
and immediately and permanently delete the message and any attachments.
Thank you


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