use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class TreeTablePanel method deleteNodePerformed.
private void deleteNodePerformed(final SelectableBeanImpl<OrgType> orgToDelete, AjaxRequestTarget target) {
ConfirmationPanel confirmationPanel = new DeleteConfirmationPanel(getPageBase().getMainPopupBodyId(), new IModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
if (hasChildren(orgToDelete)) {
return createStringResource("TreeTablePanel.message.warn.deleteTreeObjectConfirm", WebComponentUtil.getEffectiveName(orgToDelete.getValue(), OrgType.F_DISPLAY_NAME)).getObject();
}
return createStringResource("TreeTablePanel.message.deleteTreeObjectConfirm", WebComponentUtil.getEffectiveName(orgToDelete.getValue(), OrgType.F_DISPLAY_NAME)).getObject();
}
}) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteNodeConfirmedPerformed(orgToDelete, target);
}
};
confirmationPanel.setOutputMarkupId(true);
getPageBase().showMainPopup(confirmationPanel, target);
}
Aggregations