There are a couple of you can't do it posts. We did it with a jsp tag. One of my co-workers found one on the web. Look around. There is a freeware/open source one out there he found. He may have modified it some. It is very possible. We did it. Sorry I can't be more help but I don't know the URL.
Mike

From: Justin Ashworth <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: 'Struts Users Mailing List' <[EMAIL PROTECTED]>
Subject: RE: Rendering alternate rows of a table in Struts
Date: Fri, 07 Feb 2003 09:50:36 -0500

You can do it quite easily with JSTL...

<c:forEach var="row" items="${tabledata}" varStatus="info">

   <c:set var="tdclass" value="blue-row"/>
   <c:if test="${info.count % 2 == 0}">
      <c:set var="tdclass" value="red-row"/>
   </c:if>

   <td class="<c:out value='${tdclass}'/>">Data</td>
</c:forEach>

> -----Original Message-----
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 9:35 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Rendering alternate rows of a table in Struts
>
>
> No.  You have to use a scriptlet.  But remember -
> philosophical purity should always yield to pragmatism.
>
> Mark
>
> -----Original Message-----
> From: Ritesh Singhal [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 07, 2003 9:19 AM
>
> 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.
>
>
>
> ---------------------------------------------------------------------
> 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]

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


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

Reply via email to