use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.
the class DefinitionStagesPanel method deletePerformed.
private void deletePerformed(AjaxRequestTarget target) {
ConfirmationPanel dialog = new ConfirmationPanel(getPageBase().getMainPopupBodyId(), new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
StageDefinitionDto dto = getModelObject().get(tabPanel.getSelectedTab());
return getString("DefinitionStagesPanel.confirmDeleteText", dto.getName());
}
}) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
getPageBase().hideMainPopup(target);
deleteConfirmedPerformed(target);
}
};
getPageBase().showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.
the class PageConnectorHosts method deleteHostPerformed.
private void deleteHostPerformed(AjaxRequestTarget target) {
List<SelectableBean<ConnectorHostType>> selected = WebComponentUtil.getSelectedData(getConnectorHostTable());
if (selected.isEmpty()) {
warn(getString("pageResources.message.noHostSelected"));
target.add(getFeedbackPanel());
return;
}
ConfirmationPanel dialog = new ConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), createDeleteConfirmString("pageResources.message.deleteHostConfirm", "pageResources.message.deleteHostsConfirm", false)) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
((PageBase) getPage()).hideMainPopup(target);
deleteHostConfirmedPerformed(target);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.
the class PageResources method deleteResourcePerformed.
private void deleteResourcePerformed(AjaxRequestTarget target, ResourceType single) {
List<ResourceType> selected = isAnyResourceSelected(target, single);
singleDelete = single;
if (selected.isEmpty()) {
return;
}
ConfirmationPanel dialog = new ConfirmationPanel(((PageBase) getPage()).getMainPopupBodyId(), createDeleteConfirmString("pageResources.message.deleteResourceConfirm", "pageResources.message.deleteResourcesConfirm", true)) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
((PageBase) getPage()).hideMainPopup(target);
deleteResourceConfirmedPerformed(target);
}
};
((PageBase) getPage()).showMainPopup(dialog, target);
}
use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.
the class AssignmentTablePanel method getDeleteAssignmentPopupContent.
private Popupable getDeleteAssignmentPopupContent() {
return new ConfirmationPanel(getPageBase().getMainPopupBodyId(), new AbstractReadOnlyModel<String>() {
private static final long serialVersionUID = 1L;
@Override
public String getObject() {
return getAssignmentsDeleteMessage(getSelectedAssignments().size());
}
}) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
deleteAssignmentConfirmedPerformed(target, getSelectedAssignments());
reloadMainFormButtons(target);
}
}
};
}
use of com.evolveum.midpoint.web.component.dialog.ConfirmationPanel in project midpoint by Evolveum.
the class PageCertCampaigns method getCloseCampaignConfirmationPanel.
private Popupable getCloseCampaignConfirmationPanel() {
return new ConfirmationPanel(getMainPopupBodyId(), createCloseCampaignConfirmString()) {
private static final long serialVersionUID = 1L;
@Override
public void yesPerformed(AjaxRequestTarget target) {
ModalWindow modalWindow = findParent(ModalWindow.class);
if (modalWindow != null) {
modalWindow.close(target);
closeCampaignConfirmedPerformed(target, relevantCampaign);
}
}
@Override
public StringResourceModel getTitle() {
return createStringResource("PageCertCampaigns.dialog.title.confirmCloseCampaign");
}
};
}
Aggregations