//Merging, grouping etc could have led to the selected HTML cell disappearing
if ( tce != null ) {
String cellSelectedStyle = resources.cellTableCellSelected();
String cellMultipleValuesStyle = resources.cellTableCellMultipleValues();
String cellOtherwiseStyle = resources.cellTableCellOtherwise();
tce.removeClassName( cellSelectedStyle );
//Re-apply applicable styling
if ( cell.isOtherwise() ) {
tce.addClassName( cellOtherwiseStyle );
}