if (dataModel != null) {
if (dataModel instanceof RowMarker) {
RowMarker rowMarker = (RowMarker) dataModel;
RowMarks rowMarks = rowMarker.getRowMarks();
if (rowMarks != null) {
if (componentId.equals(COMP_ID_MARK_ALL) || componentId.equals(COMP_ID_UNMARK_ALL)) {
boolean checked = componentId.equals(COMP_ID_MARK_ALL);
if (checked) {
rowMarks.markAll();
}
else {
rowMarks.unmarkAll();
}
}
else if (componentId.equals(COMP_ID_DELETE)) {
try {
int totalDeletedRows = rowMarker.deleteMarkedRows();
logger.debug("Deleted {0} rows.", totalDeletedRows);
addGlobalSuccessInfoMessage();
}
catch (Exception e) {
logger.error(e.getMessage(), e);