On Tue, Jan 20, 2009 at 1:29 AM, wesleywj2 <wesley...@yahoo.co.uk> wrote:
> hi there, Hi! > i 've wondered how to change the background color of the <tr> element based > on data? > normally we just override the css, but on my case, when my data is > populated; one of my column is a fixed string. based on this column value i > will have a unique background color for it. so how do it i do it with T5's > grid? Use the rowClass parameter. Something like: <table t:type="Grid" t:rowClass="rowClass" t:row="object" ...../> public String getRowClass() { if (object.getTag().equals("DP")) { return "redBackground"; } else { return ""; } } In your CSS: tr.redBackground { background-color: red; } -- Thiago --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org