You'll be find CLASS attibuts on JavaDoc (seems OK for TABLE see
org.apache.ecs.ElementAttributes)
You can use both, one time on TR each time on TD (i recommend because TD
should have its own style definition)
But remember that NS required "&nbsp;" for an empty <TD></TD> or class 'll
not effect
This is now out of topic (???) Contact me directly if Pbs
Fred
[EMAIL PROTECTED]


-----Original Message-----
From: RESTREPO, ALEXANDER G [Non-Pharmacia/1000]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 6:01 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Alternating BGCOLOR for rows in a table


Frederic:

Do you use the class="name" on <td> or
<tr>?

Does the table object have a class element?


Thanks:

Alex Restrepo



-----Original Message-----
From: Stephan Nagy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 13, 2001 10:36 AM
To: [EMAIL PROTECTED]
Subject: Re: Alternating BGCOLOR for rows in a table


frederic Gilbart wrote:

> I use nearly that way but using CSS, some ECS tags have CLASS element.

You could always change the class="name" instead of using the setBgColor
method
should still work.

-stephan

>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Stephan Nagy
> Sent: Tuesday, March 13, 2001 5:23 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Alternating BGCOLOR for rows in a table
>
> "RESTREPO, ALEXANDER G [Non-Pharmacia/1000]" wrote:
>
> > Hi:
> >
> > I want to change the color of table rows after I
> > create my table object.
> >
> > I want to do this after I create my table object
> > in order to allow an HTML developer the ability to
> > modify the characteristic of how a table looks without
> > knowing too much about ECS...
> >
> > Is there a simple way to specify alternate colors for
> > table rows? For example, all odd rows are red and
> > all even rows are blue.
> >
> > Any ideas would be greatly appreciated.
>
> An inelegant way would be.
>
> int x = 1;
> Enumeration keys = table.keys();
> while(keys.hasNextElement())
> {
>     if(x%2 != 0)
>
>
((TR)table.getElement((String)keys.nextElement()).setBgColor(HtmlColor.RED);
>
>     else
>
>
((TR)table.getElement((String)keys.nextElement()).setBgColor(HtmlColor.BLUE)
> ;
>
>     x++;
> }
>
> That should work i didn't try and compile it but you get the general
> idea.
>
> -stephan
>


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