protected boolean hasControlPermission() {
return this.hasControlPermission;
}
protected void setupTableInteractions() {
addTableAction(MSG.common_button_delete(), getDeleteConfirmMessage(), ButtonColor.RED, new TableAction() {
public boolean isEnabled(ListGridRecord[] selection) {
int count = selection.length;
return (count >= 1 && hasControlPermission());
}
public void executeAction(ListGridRecord[] selection, Object actionValue) {
deleteSelectedRecords();
}
});
addTableAction(MSG.view_operationHistoryList_button_forceDelete(), getDeleteConfirmMessage(), ButtonColor.RED,
new TableAction() {
public boolean isEnabled(ListGridRecord[] selection) {
int count = selection.length;
return (count >= 1 && hasControlPermission());
}
public void executeAction(ListGridRecord[] selection, Object actionValue) {
DSRequest requestProperties = new DSRequest();
requestProperties.setAttribute("force", true);
deleteSelectedRecords(requestProperties);
}
});
addTableAction(MSG.common_button_cancel(), MSG.view_operationHistoryList_cancelConfirm(), new TableAction() {
public boolean isEnabled(ListGridRecord[] selection) {
int count = selection.length;
for (ListGridRecord item : selection) {
if (!OperationRequestStatus.INPROGRESS.name().equals(
item.getAttribute(OperationHistoryDataSource.Field.STATUS))) {