Search in sources :

Example 1 with RunReportPopupPanel

use of com.evolveum.midpoint.web.page.admin.reports.component.RunReportPopupPanel in project midpoint by Evolveum.

the class PageReports method runReportPerformed.

protected void runReportPerformed(AjaxRequestTarget target, ReportType report) {
    RunReportPopupPanel runReportPopupPanel = new RunReportPopupPanel(getMainPopupBodyId(), report) {

        private static final long serialVersionUID = 1L;

        protected void runConfirmPerformed(AjaxRequestTarget target, ReportType reportType, PrismContainer<ReportParameterType> reportParam) {
            OperationResult result = new OperationResult(OPERATION_RUN_REPORT);
            try {
                Task task = createSimpleTask(OPERATION_RUN_REPORT);
                getReportManager().runReport(reportType.asPrismObject(), reportParam, task, result);
            } catch (Exception ex) {
                result.recordFatalError(ex);
            } finally {
                result.computeStatusIfUnknown();
            }
            showResult(result);
            target.add(getFeedbackPanel(), get(createComponentPath(ID_MAIN_FORM)));
            hideMainPopup(target);
        }

        ;
    };
    showMainPopup(runReportPopupPanel, target);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Task(com.evolveum.midpoint.task.api.Task) PrismContainer(com.evolveum.midpoint.prism.PrismContainer) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) RunReportPopupPanel(com.evolveum.midpoint.web.page.admin.reports.component.RunReportPopupPanel) ReportType(com.evolveum.midpoint.xml.ns._public.common.common_3.ReportType)

Aggregations

PrismContainer (com.evolveum.midpoint.prism.PrismContainer)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Task (com.evolveum.midpoint.task.api.Task)1 RunReportPopupPanel (com.evolveum.midpoint.web.page.admin.reports.component.RunReportPopupPanel)1 ReportType (com.evolveum.midpoint.xml.ns._public.common.common_3.ReportType)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1