status.setAlign(Alignment.CENTER);
status.setType(ListGridFieldType.IMAGE);
status.setCellFormatter(new CellFormatter() {
public String format(Object value, ListGridRecord record, int rowNum, int colNum) {
String statusStr = record.getAttribute("status");
ResultState statusEnum = (statusStr == null) ? ResultState.UNKNOWN : ResultState.valueOf(statusStr);
return imgHTML(ImageManager.getAlertNotificationResultIcon(statusEnum));
}
});
status.setShowHover(true);
status.setHoverCustomizer(new HoverCustomizer() {
public String hoverHTML(Object value, ListGridRecord record, int rowNum, int colNum) {
String statusStr = record.getAttribute("status");
ResultState statusEnum = (statusStr == null) ? ResultState.UNKNOWN : ResultState.valueOf(statusStr);
switch (statusEnum) {
case SUCCESS:
return MSG.common_status_success();
case FAILURE:
return MSG.common_status_failed();