Changing background color of Datatable Cell

Hi People,

I would like to know that can I change the color (background + foreground) of a particular cell in the the data table.

My problem is that we have the values for background and foreground text color stored in the database.

We have to fetch these colors from the database and show the poduct name according to these stored colors.

Product name is a column in the data table and each row contains info about a a particular product.

I will highly appreciate your help.

Thanks in advance.

[537 byte] By [CoolCodera] at [2007-11-27 5:21:23]
# 1
You can use EL in styleClass and style.<h:someComponent styleClass="#{dataItem.styleClass}" /><h:someComponent style="color: #{dataItem.hexColor};" />
BalusCa at 2007-7-12 11:46:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Well first of all thanks BalusC for ur suggestion.I am able to color a particular cell.But I have an additional problem. The cell background is not set completely. only some part of the cell is changed.Could anone help.
CoolCodera at 2007-7-12 11:46:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Most likely you've applied the CSS at the wrong element.How does the generated HTML look like? And ask yourself how it *should* look like.
BalusCa at 2007-7-12 11:46:25 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...