Search in sources :

Example 1 with JasperReportConfigurationPanel

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

the class PageReport method initLayout.

private void initLayout() {
    Form mainForm = new Form(ID_MAIN_FORM);
    add(mainForm);
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new AbstractTab(createStringResource("PageReport.basic")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new ReportConfigurationPanel(panelId, model);
        }
    });
    tabs.add(new AbstractTab(createStringResource("PageReport.jasperTemplate")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            return new JasperReportConfigurationPanel(panelId, model);
        //                IModel<String> title = PageReport.this.createStringResource("PageReport.jasperTemplate");
        //                IModel<String> data = new Base64Model(new PrismPropertyModel<>(model, ReportType.F_TEMPLATE));
        //                return new AceEditorPanel(panelId, title, data);
        }
    });
    tabs.add(new AbstractTab(createStringResource("PageReport.jasperTemplateStyle")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer getPanel(String panelId) {
            IModel<String> title = PageReport.this.createStringResource("PageReport.jasperTemplateStyle");
            IModel<String> data = new Base64Model(new PropertyModel(model, "templateStyle"));
            return new AceEditorPanel(panelId, title, data);
        }
    });
    //        tabs.add(new AbstractTab(createStringResource("PageReport.fullXml")) {
    //
    //            @Override
    //            public WebMarkupContainer getPanel(String panelId) {
    //                IModel<String> title = PageReport.this.createStringResource("PageReport.fullXml");
    //
    //                AceEditorPanel panel = new AceEditorPanel(panelId, title, createFullXmlModel());
    //                panel.getEditor().add(createFullXmlValidator());
    //                return panel;
    //            }
    //        });
    TabbedPanel<ITab> reportTabPanel = WebComponentUtil.createTabPanel(ID_TAB_PANEL, this, tabs, null);
    reportTabPanel.setOutputMarkupId(true);
    mainForm.add(reportTabPanel);
    initButtons(mainForm);
}
Also used : IModel(org.apache.wicket.model.IModel) JasperReportConfigurationPanel(com.evolveum.midpoint.web.page.admin.reports.component.JasperReportConfigurationPanel) ReportConfigurationPanel(com.evolveum.midpoint.web.page.admin.reports.component.ReportConfigurationPanel) Form(org.apache.wicket.markup.html.form.Form) AceEditorPanel(com.evolveum.midpoint.web.page.admin.reports.component.AceEditorPanel) Base64Model(com.evolveum.midpoint.web.util.Base64Model) ArrayList(java.util.ArrayList) PropertyModel(org.apache.wicket.model.PropertyModel) JasperReportConfigurationPanel(com.evolveum.midpoint.web.page.admin.reports.component.JasperReportConfigurationPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) AbstractTab(org.apache.wicket.extensions.markup.html.tabs.AbstractTab)

Aggregations

AceEditorPanel (com.evolveum.midpoint.web.page.admin.reports.component.AceEditorPanel)1 JasperReportConfigurationPanel (com.evolveum.midpoint.web.page.admin.reports.component.JasperReportConfigurationPanel)1 ReportConfigurationPanel (com.evolveum.midpoint.web.page.admin.reports.component.ReportConfigurationPanel)1 Base64Model (com.evolveum.midpoint.web.util.Base64Model)1 ArrayList (java.util.ArrayList)1 AbstractTab (org.apache.wicket.extensions.markup.html.tabs.AbstractTab)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1 Form (org.apache.wicket.markup.html.form.Form)1 IModel (org.apache.wicket.model.IModel)1 PropertyModel (org.apache.wicket.model.PropertyModel)1