@Override
protected void populateItem(Item<IColumn<T, S>> item)
{
final IColumn<T, S> column = item.getModelObject();
WebMarkupContainer header = null;
if (column.isSortable())
{
header = newSortableHeader("header", column.getSortProperty(), stateLocator);
}
else
{
header = new WebMarkupContainer("header");
}
if (column instanceof IStyledColumn)
{
CssAttributeBehavior cssAttributeBehavior = new DataTable.CssAttributeBehavior()
{
private static final long serialVersionUID = 1L;
@Override
protected String getCssClass()
{
return ((IStyledColumn<?, S>)column).getCssClass();
}
};
header.add(cssAttributeBehavior);
}
item.add(header);
item.setRenderBodyOnly(true);
header.add(column.getHeader("label"));
}
};
add(headers);
}