} catch (final InterruptedException e) {
throw new RuntimeException(e);
}
return;
}
ListModelList lml1 = (ListModelList) rigType.getListModel();
SecTyp typ = (SecTyp) lml1.get(item.getIndex());
aRight.setRigType(Integer.valueOf(typ.getStpId()));
// save it to database
try {
getSecurityService().saveOrUpdate(aRight);
} catch (DataAccessException e) {
ZksampleMessageUtils.showErrorMessage(e.getMostSpecificCause().toString());
// Reset to init values
doResetInitValues();
doReadOnly();
btnCtrl.setBtnStatus_Save();
return;
}
// now synchronize the listBox
ListModelList lml = (ListModelList) this.listBoxSecRights.getListModel();
// Check if the object is new or updated
// -1 means that the obj is not in the list, so it's new.
if (lml.indexOf(aRight) == -1) {
lml.add(aRight);
} else {
lml.set(lml.indexOf(aRight), aRight);
}
doReadOnly();
btnCtrl.setBtnStatus_Save();
// init the old values vars new