Well, actually there is one: you can use the style class of the
t:columns with something similar to the thing pointed by Julian.
Something like this:

<t:column styleClass="#{rowVal.cost < 0.0? 'negValueStyle' : 'posValueStyle'}">
...
</t:column>

Cheers!

Bruno

On 6/25/06, Julian Ray <[EMAIL PROTECTED]> wrote:
I don't think that there is any direct way you can change the column class
for an individual cell without writing your own renderer. You can always
have <outputText> elements in the cells which you can use either EL or a
backing bean to set the styleClass. For example using EL

<h:column>
        <h:outputText value="#{rowVal.cost}" styleClass="#{rowVal.cost < 0.0
? 'negValueStyle' : 'posValueStyle'}"/>
</h:column>

-----Original Message-----
From: Frank Langelage [mailto:[EMAIL PROTECTED]
Sent: Sunday, June 25, 2006 11:18 AM
To: MyFaces Discussion
Subject: datatable, different cell attribures?

To build a table with a variable number of rows and cols I used a
t:datatable with a t:columns child.
This works pretty good.
Is there a way to use different css-classes or attributes for an individual
cell?
If the value displayed in the cell exceeds a certain value I want to
highlight this cell by using a red background or something like that.


Reply via email to