setStyleClass using conditions
Sorry for another question, but here it is:
Is it possible to call setStyleClass and pass a conditional expression? For instance, on all static JSPs in our system, a line like this works perfectly:
styleClass ="#{myBB.rowIndex == myBB.sortedModel.rowIndex ? 'selectedStyleBlue' : ''}"
However, if I am using a dynamic datatable and calling setStyleClass as
detailText.setStyleClass("#{myBB.rowIndex == myBB.sortedModel.rowIndex ? 'selectedStyleBlue' : ''}");
it completely ignores the styleClass. Moreover, if I call it like this, it works:
detailText.setStyleClass("selectedStyleBlue");
detailText is an instance of HtmlOutputText. What am I doing wrong?

