| Author |
How to dynamically change color in row?
|
Higgledy Smith
Ranch Hand
Joined: Mar 07, 2006
Posts: 192
|
|
|
I am learning JSF, using ICEFaces dataTable. Is it possible to change the text color in a cell to red if the value equals "HQ"? If it is possible can you give details on how to accomplish this? Thank you.
|
 |
Rorco Reggz
Greenhorn
Joined: Jul 21, 2009
Posts: 8
|
|
Try this:
The css file looks like this:
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14491
|
|
You can also return a style classname directly from the EL, putting the logic in the backing bean.
One way requires making the page sensitive to particular data values, the other means making the model sensitive to specific view options. Which way is "better" will depend on your particular needs.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Higgledy Smith
Ranch Hand
Joined: Mar 07, 2006
Posts: 192
|
|
|
Thank you once again, Rorco. Where did you learn so much about JSF?
|
 |
 |
|
|
subject: How to dynamically change color in row?
|
|
|