RE: alternating row colors in the iterate tag.

2002-09-10 Thread wbchmura


BDY.RTF
Description: RTF file


RE: alternating row colors in the iterate tag.

2002-09-10 Thread Todd G. Nist

Nanijon,

You can find the a taglib for this at:
http://jakarta.apache.org/struts/resources/taglibs.html once there look down
the page for RowTag, works quite well.

If you would prefer to use a scriplet then the following will work:

style
/* Even row */
td.row0 {
background-color: #FF;
}
/* Odd row */
td.row1 {
background-color: #cc;
}
/style
...
logic:iterate ... indexId=i ...
trtd class=row%= i % 2 %your text or data here/td/tr
/logic:iterate

Hope this helps.

Regards,
Todd G. Nist

-Original Message-
From: Nani Jon [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 10, 2002 3:32 PM
To: Struts Users Mailing List
Subject: Re: alternating row colors in the iterate tag.



Hey Dave:
Would you be so kind to share that code? It will be greatly appreciated.
Thanks,
Nanijon.
 David Graham wrote:I don't think you can do it directly with the iterate
tag. I think there is
a tag in the jakarta taglibs project that does this. I wrote my own tag to
do it (it doesn't take long). You would use your tag within the iterate tag
to generate the
Dave


Hi all:

Is there a way to alternate row background colors within an  tag? I
was able to do it using java scriplet. The problem is the
value of the varaible rowColor shows up on the JSP. Here is a snippet of
the code in the JSP page:



..

  String rowColor = #ff;
  String prevColor = #ff;
  String nextColor = #cc;
%

 ...

...

property=mainInfo.titleCollection type=com.acs.backend.dao.MusicDAO
 

 ..















-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes




_
Join the worlds largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:
For additional commands, e-mail:



-
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes



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