use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto in project midpoint by Evolveum.
the class PageCreatedReports method deleteSelectedPerformed.
private void deleteSelectedPerformed(AjaxRequestTarget target, ReportDeleteDialogDto.Operation op, ReportOutputType single) {
List<ReportOutputType> selected = getSelectedData();
if (single != null) {
selected.clear();
selected.add(single);
}
if (selected.isEmpty()) {
return;
}
ReportDeleteDialogDto dto = new ReportDeleteDialogDto(op, selected);
deleteModel.setObject(dto);
getPageBase().showMainPopup(getDeleteDialogPanel(), target);
}
use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto in project midpoint by Evolveum.
the class PageCreatedReports method deleteAllPerformed.
private void deleteAllPerformed(AjaxRequestTarget target, ReportDeleteDialogDto.Operation op) {
final ReportDeleteDialogDto dto = new ReportDeleteDialogDto(op, null);
deleteModel.setObject(dto);
getPageBase().showMainPopup(getDeleteDialogPanel(), target);
}
use of com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto in project midpoint by Evolveum.
the class PageCreatedReports method getDeleteDialogPanel.
private ConfirmationPanel getDeleteDialogPanel() {
ConfirmationPanel dialog = new ConfirmationPanel(getPageBase().getMainPopupBodyId(), createDeleteConfirmString()) {
@Override
public void yesPerformed(AjaxRequestTarget target) {
getPageBase().hideMainPopup(target);
ReportDeleteDialogDto dto = deleteModel.getObject();
switch(dto.getOperation()) {
case DELETE_SINGLE:
deleteSelectedConfirmedPerformed(target, Arrays.asList(dto.getObjects().get(0)));
break;
case DELETE_SELECTED:
deleteSelectedConfirmedPerformed(target, dto.getObjects());
break;
case DELETE_ALL:
deleteAllConfirmedPerformed(target);
break;
}
}
};
return dialog;
}
Aggregations