I was thinking about this problem this morning. I don't really agree that it would be a big minus for jsf, but I came up with a few, fairly hacky, ways to do it.
*** Option 1 ***
To highlight the cell at (2,2)
<h
anelGrid columns="5" columnClasses="default, col-highlight, default" rowClasses="default, row-highlight, default">
I'm not sure what the css would look like. It would depend on how the styles are printed out. If the 'rowClasses' are placed on the rows and 'colClasses' on the cells, you would do...
.row-highlight td.col-highlight
{
backgroun-color: red;
}
A different variation if they were printed differently.
*** Option 2 ***
Assign the css class in javascript after the table:
document.getElementById("myForm:myTable").className = "something";
Some type of taglib should probably be built to get the id from the jsf system.
*** Option 3 ***
Output a span with verbatim (or something similar) with an id. Get the span id and get the parent cell from that...
function assignClassToParentCell(targetId, cssClass)
{
var targetObj = document.getElementById(targetId);
while(targetObj != null && targetObj.nodeName != "td")
{
targetObj = targetObj.parentNode;
}
if(targetObj != null)
targetObj.className = cssClass;
}
(Note: I have never run the above, so it would need to be tested. Specifically the loop condition 'targetObj != null')