int count = 1;
initProgressBar(items.size());
view.setListSelectionListenersEnabled(false);
try {
DcObject item = module.getItem();
int colID = tblItems.getColumnIndexForField(DcObject._ID);
int colValue = tblItems.getColumnIndexForField(field);
int colEnabled = tblItems.getColumnModel().getColumnIndex("ENABLED");
for (int row = 0; row < tblItems.getRowCount(); row++) {
if (!keepOnRunning) break;
if ((Boolean) tblItems.getValueAt(row, colEnabled)) {
item.markAsUnchanged();
item.setValue(DcObject._ID, tblItems.getValueAt(row, colID, true));
item.setValue(field, tblItems.getValueAt(row, colValue, true));
try {
if (view.getType() == View._TYPE_SEARCH) {
item.saveUpdate(false, false);
} else if (view.getType() == View._TYPE_INSERT) {
view.updateItem(item.getID(), item);
}
} catch (Exception e) {
// warn the user of the event that occurred (for example an incorrect parent for a container)
DcSwingUtilities.displayErrorMessage(e.getMessage());
}