[Seaside] Re: Coloring rows of a batched list accordingly an instvar value

German Arduino gsa at softhome.net
Fri Nov 11 17:39:35 CET 2005


Esteban A. Maringolo wrote:
> Hello German,
> 
> German Arduino escribió:
> 
>> Hi Guys:
>>
>> I must show "data" that I read from an SQL Server db in a batchedlist.
>>
>> Each row must be of a color determined by the value of one of the 
>> showed instvar (of the object that I build from the SQL database) to 
>> show in the batchedlist, but I can't figure out how to do this.
> 
> 
> Supposing aCollection contains your domain objects.
> 
> html table: [
>   aCollection do: [:each |
>     html style: 'background-color: ', self backcolorFor: each, ';'.
>     html tableRow: [
>     html tableData: [...]
>     html tableData: [...]   
>     ...
>     ]
>   ]
> ]
> 
> 
> Best regards,
> 
> -- 
> Esteban.
Thanks Esteban.

I will try.

In the maintime I've tried using WATableReport and WAReportColmuns and 
friends but no way with the color. Will investigate if can use the same 
approach that you are telling me in this context.

Regards.
gsa.



More information about the Seaside mailing list