public void decorate(JspContext jspContext, AbstractRenderAppender appender, CellModel cellModel)
throws CellDecoratorException {
assert cellModel instanceof HeaderCellModel;
HeaderCellModel headerCellModel = (HeaderCellModel)cellModel;
assert getNestedDecorator() != null : "SortedCellDecorator did not find a nested decorator and requires one";
getNestedDecorator().decorate(jspContext, appender, cellModel);
if(headerCellModel.isSortable()) {
String sortLink = buildSortLink(jspContext, headerCellModel);
appender.append(" ");
appender.append(sortLink);
}
}