Search in sources :

Example 1 with ReportDeleteDialogDto

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);
}
Also used : ReportDeleteDialogDto(com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto) ReportOutputType(com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType)

Example 2 with ReportDeleteDialogDto

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);
}
Also used : ReportDeleteDialogDto(com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto)

Example 3 with ReportDeleteDialogDto

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;
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ReportDeleteDialogDto(com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto) ConfirmationPanel(com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)

Aggregations

ReportDeleteDialogDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReportDeleteDialogDto)3 ConfirmationPanel (com.evolveum.midpoint.web.component.dialog.ConfirmationPanel)1 ReportOutputType (com.evolveum.midpoint.xml.ns._public.common.common_3.ReportOutputType)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1