for (ListGridRecord record : selection) {
doomedNames.add(record.getAttribute(UsersDataSource.Field.NAME));
doomedIds[i++] = record.getAttributeAsInt(UsersDataSource.Field.ID);
}
SubjectGWTServiceAsync subjectService = GWTServiceLookup.getSubjectService();
subjectService.deleteSubjects(doomedIds, new AsyncCallback<Void>() {
public void onFailure(Throwable caught) {
String message = MSG.dataSource_users_deleteFailed(doomedNames.toString());
CoreGUI.getErrorHandler().handleError(message, caught);
UsersView.this.refresh();
}