[Seaside] How to alternate table row colors without WATableReport

Gerhard Obermann obi068 at gmail.com
Sat Mar 14 18:30:53 UTC 2009


Why do you need the extra div.
It would work if you assign the class to the tableRow!

br
Gerhard

On Sat, Mar 14, 2009 at 7:22 PM, Sorensen <sorens at surfy.net> wrote:

>
> 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.
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20090314/ae8e0206/attachment.htm


More information about the seaside mailing list