use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class DefinitionStagesPanel method deletePerformed.
private void deletePerformed(AjaxRequestTarget target) {
ConfirmationPanel dialog = new DeleteConfirmationPanel(getPageBase().getMainPopupBodyId(), new IModel<String>() {
@Override
public String getObject() {
StageDefinitionDto dto = getModelObject().get(tabPanel.getSelectedTab());
return getString("DefinitionStagesPanel.confirmDeleteText", dto.getName());
}
}) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteConfirmedPerformed(target);
}
};
getPageBase().showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class PageResources method deleteResourcePerformed.
private void deleteResourcePerformed(AjaxRequestTarget target, ResourceType single) {
List<ResourceType> selected = isAnyResourceSelected(target, single);
if (selected.size() < 1) {
warn(createStringResource("pageResources.message.noResourceSelected").getString());
target.add(getFeedbackPanel());
return;
}
singleDelete = single;
if (selected.isEmpty()) {
return;
}
ConfirmationPanel dialog = new DeleteConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), createDeleteConfirmString("pageResources.message.deleteResourceConfirm", "pageResources.message.deleteResourcesConfirm")) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteResourceConfirmedPerformed(target);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class PageConnectorHosts method deleteHostPerformed.
private void deleteHostPerformed(AjaxRequestTarget target) {
List<ConnectorHostType> selected = getObjectListPanel().getSelectedRealObjects();
if (selected.isEmpty()) {
warn(getString("pageResources.message.noHostSelected"));
target.add(getFeedbackPanel());
return;
}
ConfirmationPanel dialog = new DeleteConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), createDeleteConfirmString("pageResources.message.deleteHostConfirm", "pageResources.message.deleteHostsConfirm", false)) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteHostConfirmedPerformed(target);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class ResourceContentPanel method deleteResourceObjectPerformed.
// TODO: as a task?
protected void deleteResourceObjectPerformed(ShadowType selected, AjaxRequestTarget target) {
final List<ShadowType> selectedShadow = getSelectedShadowsList(selected);
final OperationResult result = new OperationResult(OPERATION_DELETE_OBJECT);
if (selectedShadow == null || selectedShadow.isEmpty()) {
result.recordWarning(createStringResource("ResourceContentPanel.message.deleteResourceObjectPerformed.warning").getString());
getPageBase().showResult(result);
target.add(getPageBase().getFeedbackPanel());
return;
}
ConfirmationPanel dialog = new DeleteConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), createDeleteConfirmString(selected, "pageContentAccounts.message.deleteConfirmationSingle", "pageContentAccounts.message.deleteConfirmation")) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteAccountConfirmedPerformed(target, result, selectedShadow);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.DeleteConfirmationPanel in project midpoint by Evolveum.
the class OperationalButtonsPanel method deletePerformed.
private void deletePerformed(AjaxRequestTarget target) {
ConfirmationPanel confirmationPanel = new DeleteConfirmationPanel(getPageBase().getMainPopupBodyId(), createStringResource("OperationalButtonsPanel.deletePerformed", WebComponentUtil.getDisplayNameOrName(getPrismObject()))) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
deleteConfirmPerformed(target);
}
};
getPageBase().showMainPopup(confirmationPanel, target);
}
Aggregations