{
if (uiComponent instanceof UIColumn)
{
// allow column to override style class, new in JSF 1.2
if (uiComponent instanceof HtmlColumn) {
HtmlColumn column = (HtmlColumn)uiComponent;
if (isHeader && column.getHeaderClass()!=null)
styleClass = column.getHeaderClass();
else if (!isHeader && column.getFooterClass()!=null)
styleClass = column.getFooterClass();
}else{
//This code corrects MYFACES-1790, because HtmlColumnTag
//has as component type javax.faces.Column, so as side
//effect it not create HtmlColumn, it create UIColumn
//classes.
UIColumn column = (UIColumn) uiComponent;
if (isHeader){
String headerClass = (String) column.getAttributes().get("headerClass");
if (headerClass != null){
styleClass = (String) headerClass;
}
}else{
String footerClass = (String) column.getAttributes().get("footerClass");
if (footerClass != null){
styleClass = (String) footerClass;
}
}
}