severityField.setSortNormalizer(new SortNormalizer() {
@Override
public Object normalize(ListGridRecord record, String fieldName) {
try {
Severity severity = ((Message) record.getAttributeAsObject(FIELD_OBJECT)).getSeverity();
return Integer.valueOf(severity.ordinal());
} catch (Throwable e) {
Log.error("Cannot get sort nomalizer", e);
}
return Integer.valueOf(0);
}