use of com.evolveum.midpoint.web.session.OrgTreeStateStorage in project midpoint by Evolveum.
the class TreeTablePanel method deleteNodeConfirmedPerformed.
private void deleteNodeConfirmedPerformed(SelectableBeanImpl<OrgType> orgToDelete, AjaxRequestTarget target) {
OperationResult result = new OperationResult(OPERATION_DELETE_OBJECT);
PageBase page = getPageBase();
if (orgToDelete == null) {
orgToDelete = getTreePanel().getRootFromProvider();
}
if (orgToDelete.getValue() == null) {
return;
}
if (CollectionUtils.isEmpty(orgToDelete.getValue().getParentOrgRef())) {
OrgTreeStateStorage storage = getTreePanel().getOrgTreeStateStorage();
if (storage != null) {
storage.setSelectedTabId(-1);
}
getTreePanel().setSelectedItem(null, storage);
}
String oidToDelete = orgToDelete.getValue().getOid();
WebModelServiceUtils.deleteObject(OrgType.class, oidToDelete, result, page);
result.computeStatusIfUnknown();
page.showResult(result);
target.add(getPageBase().getFeedbackPanel());
// TODO is this ok? [pmed]
throw new RestartResponseException(getPage().getClass());
}
Aggregations