Search in sources :

Example 6 with JasperReportParameterDto

use of com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportParameterDto in project midpoint by Evolveum.

the class JasperReportConfigurationPanel method initParameterColumns.

private List<IColumn<JasperReportParameterDto, String>> initParameterColumns() {
    List<IColumn<JasperReportParameterDto, String>> columns = new ArrayList<>();
    IColumn<JasperReportParameterDto, String> column = new CheckBoxHeaderColumn<>();
    columns.add(column);
    // name editing column
    columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.parameterName", null, "name", true));
    // class editing column
    columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.parameterClass", null, "typeAsString", true));
    columns.add(buildEditableLinkColumn("JasperReportConfigurationPanel.nestedClass", null, "nestedTypeAsString", true));
    columns.add(new LinkColumn<JasperReportParameterDto>(createStringResource("JasperReportConfigurationPanel.properties")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target, IModel<JasperReportParameterDto> rowModel) {
            showPropertiesPopup(target, rowModel);
        }

        @Override
        protected IModel createLinkModel(IModel<JasperReportParameterDto> rowModel) {
            return createStringResource("JasperReportConfigurationPanel.configure");
        }
    });
    CheckBoxColumn<JasperReportParameterDto> forPrompting = new CheckBoxColumn<JasperReportParameterDto>(createStringResource("JasperReportConfigurationPanel.forPrompting"), "forPrompting") {

        private static final long serialVersionUID = 1L;

        @Override
        public void populateItem(Item<ICellPopulator<JasperReportParameterDto>> cellItem, String componentId, IModel<JasperReportParameterDto> rowModel) {
            CheckBoxPanel checkBox = new CheckBoxPanel(componentId, new PropertyModel<Boolean>(rowModel, getPropertyExpression()), new Model<>(true));
            cellItem.add(checkBox);
        }
    };
    columns.add(forPrompting);
    return columns;
}
Also used : IModel(org.apache.wicket.model.IModel) ArrayList(java.util.ArrayList) CheckBoxPanel(com.evolveum.midpoint.web.component.data.column.CheckBoxPanel) JasperReportParameterDto(com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportParameterDto) CheckBoxColumn(com.evolveum.midpoint.web.component.data.column.CheckBoxColumn) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) Item(org.apache.wicket.markup.repeater.Item) IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) CheckBoxHeaderColumn(com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)

Example 7 with JasperReportParameterDto

use of com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportParameterDto in project midpoint by Evolveum.

the class JasperReportConfigurationPanel method parameterEditPerformed.

private void parameterEditPerformed(AjaxRequestTarget target, IModel<JasperReportParameterDto> rowModel) {
    JasperReportParameterDto parameter = rowModel.getObject();
    parameter.setEditing(true);
    target.add(getParametersTable());
}
Also used : JasperReportParameterDto(com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportParameterDto)

Aggregations

JasperReportParameterDto (com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportParameterDto)7 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)3 ReportDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReportDto)2 ArrayList (java.util.ArrayList)2 AuditEventStage (com.evolveum.midpoint.audit.api.AuditEventStage)1 AuditEventType (com.evolveum.midpoint.audit.api.AuditEventType)1 PrismObject (com.evolveum.midpoint.prism.PrismObject)1 PrismProperty (com.evolveum.midpoint.prism.PrismProperty)1 PrismPropertyDefinitionImpl (com.evolveum.midpoint.prism.PrismPropertyDefinitionImpl)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)1 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)1 AjaxSubmitButton (com.evolveum.midpoint.web.component.AjaxSubmitButton)1 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)1 CheckBoxColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxColumn)1 CheckBoxHeaderColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)1 CheckBoxPanel (com.evolveum.midpoint.web.component.data.column.CheckBoxPanel)1 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)1 JasperReportValueDto (com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportValueDto)1 AuditEventStageType (com.evolveum.midpoint.xml.ns._public.common.audit_3.AuditEventStageType)1