Th col = new Th();
header.add( col );
if ( tableHeader.getName() != null )
{
Anchor a = new Anchor();
a.setAttribute( ATTR_REPEATER_ID, getId() );
a.addClassName( CLASS_REPEATER_LINK );
a.setInnerHtml( tableHeader.getLabel() );
OrderDirection orderDirection = OrderDirection.ASC;
if ( tableHeader.getName().equals( getOrderBy() ) )
{
col.addClassName( "sort" );
col.addClassName( getOrderDirection().name().toLowerCase() );
if ( getOrderDirection() == OrderDirection.ASC )
{
orderDirection = OrderDirection.DESC;
}
}
a.setHref( createUrl( getFirstRow(), getMaxRows(), tableHeader.getName(), orderDirection ) );
col.add( a );
}
else
{