[Seaside] How to alternate table row colors without WATableReport
Sorensen
sorens at surfy.net
Sat Mar 14 18:22:18 UTC 2009
As I understand, the usual way to alternate the colors in table rows is to
use 'html div class:' and pass in a separate CSS tag for each row color.
Eg:
collection withIndexDo: [:each :index |
html div class: ('row', (index \\ 2) printString ); with: [
html anchor
callback: [self showContact: contact];
with: (contact firstName , ‘ ‘, contact surname )]]
However, when I try to do this within a table, it does not eeem to work:
html table: [
collection withIndexDo: [:each :index |
html tableRow: [
html div class: ('row' , (index \\ 2) printString); with: [
html
tableData: each stuff1;
tableData: each stuff2]]]]
What appears in rendered page is a bunch of blank lines of alternating
colors, followed by the usual table data (which remains uncolored).
Is there a way to render such a table without using any other specialized
class such as WATableReport or such?
Thanks, Soren
--
View this message in context: http://www.nabble.com/How-to-alternate-table-row-colors-without-WATableReport-tp22512359p22512359.html
Sent from the Squeak - Seaside mailing list archive at Nabble.com.
More information about the seaside
mailing list