I'm trying to get different styles for odd and even rows in an
ObjectListTable, but can't figure out how. In the Renderer.render( )
method, there's no way I can see to determine the row number from the
TableBodyGroup. If I try and apply the shading to the ObjectListTable
directly (outside the renderer), there's no way to get a handle to
underlying TableRow objects.
Am I looking at this the right way? Do you have any suggestions?
Thanks,
--Nick
eg: Imagine a zebra table for the objects [ A, B, C, D, E ] and the
rows for B and D are darker. if you call olt.getObjects().remove(C)
then the dark rows for B and D will be next to each other.
I suggest you use a thin border between each table row, like gmail
does, instead of different background colors. Maybe in some browsers
you could use advanced CSS for odd/event elements and have that work
correctly.
That said the Renderer can find the row number by calling
olt.getObjects().indexOf(foo).
--
Sandy McArthur
"He who dares not offend cannot be honest."
- Thomas Paine