UIComponent column,
int rowSpan,
int colSpan
) throws IOException
{
ColumnData colData = tContext.getColumnData();
String colID;
if (shouldRenderId(context, column) ||
tContext.isExplicitHeaderIDMode())
// =-=AEW THIS WILL GENERATE DIFFS FROM "unique ID" land
colID = getClientId(context, column);
else
colID = null;
int physicalIndex = colData.getPhysicalColumnIndex();
int sortability = getSortability(tContext, column);
boolean sortable = (sortability != SORT_NO) &&
supportsNavigation(rc);
if(sortable)
{
// the sortable script has a "state" parameter, so add this
// to the form data if the agent does not support dynamic
// generation of elements (on those that do, form data elements
// can be created on the fly as necessary); see the JS
// referenced in this.getSortingOnclick
Object domLevel =
rc.getAgent().getCapabilities().get(TrinidadAgent.CAP_DOM);
if(
domLevel == null ||
domLevel == TrinidadAgent.DOM_CAP_NONE ||
domLevel == TrinidadAgent.DOM_CAP_FORM)
{
FormData formData = rc.getFormData();
if(formData != null)
{
formData.addNeededValue(XhtmlConstants.STATE_PARAM);
}
}
}
// we do not want to wrap if wrapping has explicitly been disabled. if we
// are inside a columnGroup then we need to check the header format on the
// columnGroup: bug 3201579:
boolean isNoWrap = colData.isColumnGroupHeader()
? colData.getCurrentHeaderNoWrap()
// =-=AEW It's weird that we're going back to colData instead
// of just looking on ourselves! When we're in a columnGroup, sure.
: colData.getHeaderNoWrap(physicalIndex);
String sortIconName = _getIconName(sortability);
Icon sortIcon = rc.getIcon(sortIconName);
boolean hasSortingIcon = (sortIcon != null) && !sortIcon.isNull();
// we do not want to wrap if there is an icon on the header:
// On PDA, where screen width is limited, we cannot afford not to
// wrap. isPDA check is used in several places in this class.
// PDA specific logic will be moved to PDA render kit in the future.
if (!isPDA(rc))
{
isNoWrap = isNoWrap || hasSortingIcon;
}
// || getRequired(bean);
// || getMessageType(bean);
Object width = tContext.getColumnWidth(physicalIndex);
ResponseWriter rw = context.getResponseWriter();
rw.startElement("th", column);
rw.writeAttribute("id", colID, "id");
CellUtils.renderHeaderAttrs(context, tContext,
null, //abbreviation (MISSING!)
width,
isNoWrap,
true); //isColHeader
String styleClass = getSortableHeaderStyleClass(tContext, sortability);
String borderStyleClass =
CellUtils.getHeaderBorderStyle(tContext,
rc,
true, //isColHeader
sortable);
renderStyleClasses(context, rc, new String[]{ styleClass,
borderStyleClass});
String style = getHeaderInlineStyle(rc);
renderInlineStyleAttribute(context, rc, column, style);
if (colSpan > 1)
rw.writeAttribute("colspan", IntegerUtils.getString(colSpan), null);
if (rowSpan == 0)
rowSpan = colData.getHeaderRowSpan();
if (rowSpan > 1)
rw.writeAttribute("rowspan", IntegerUtils.getString(rowSpan), null);
String sortOnclick = "";
if (supportsScripting(rc))