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

Esteban A. Maringolo eMaringolo at smalltalking.net
Fri Nov 11 17:20:49 CET 2005


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.



More information about the Seaside mailing list