Search in sources :

Example 1 with JasperReportFieldDto

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

the class JasperReportConfigurationPanel method deleteFieldPerformed.

private void deleteFieldPerformed(AjaxRequestTarget target) {
    Iterator<JasperReportFieldDto> iterator = getModelObject().getJasperReportDto().getFields().iterator();
    while (iterator.hasNext()) {
        JasperReportFieldDto item = iterator.next();
        if (item.isSelected()) {
            iterator.remove();
        }
    }
    target.add(getFieldsTable());
}
Also used : JasperReportFieldDto(com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportFieldDto)

Example 2 with JasperReportFieldDto

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

the class JasperReportConfigurationPanel method fieldEditPerformed.

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

Example 3 with JasperReportFieldDto

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

the class JasperReportConfigurationPanel method initFiledsTable.

private void initFiledsTable() {
    ISortableDataProvider<JasperReportFieldDto, String> provider = new ListDataProvider<JasperReportFieldDto>(this, new PropertyModel<List<JasperReportFieldDto>>(getModel(), "jasperReportDto.fields"));
    BoxedTablePanel<JasperReportFieldDto> table = new BoxedTablePanel<JasperReportFieldDto>(ID_FIELDS_TABLE, provider, initFieldColumns(), null, 10);
    //		table.setShowPaging(false);
    table.setOutputMarkupId(true);
    add(table);
    AjaxButton addParameter = new AjaxButton(ID_BUTTON_ADD_FIELD, createStringResource("JasperReportConfigurationPanel.addField")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            addFieldPerformed(target);
        }
    };
    add(addParameter);
    AjaxButton deleteParameter = new AjaxButton(ID_DELETE_FIELD, createStringResource("JasperReportConfigurationPanel.deleteField")) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(AjaxRequestTarget target) {
            deleteFieldPerformed(target);
        }
    };
    add(deleteParameter);
}
Also used : AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) ListDataProvider(com.evolveum.midpoint.web.component.util.ListDataProvider) AjaxButton(com.evolveum.midpoint.web.component.AjaxButton) ArrayList(java.util.ArrayList) List(java.util.List) JasperReportFieldDto(com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportFieldDto) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel)

Example 4 with JasperReportFieldDto

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

the class JasperReportConfigurationPanel method addFieldPerformed.

private void addFieldPerformed(AjaxRequestTarget target) {
    ReportDto dto = getModel().getObject();
    JasperReportFieldDto parameter = new JasperReportFieldDto();
    parameter.setEditing(true);
    dto.getJasperReportDto().getFields().add(parameter);
    BoxedTablePanel<JasperReportFieldDto> fieldsTable = getFieldsTable();
    adjustFieldsTablePage(fieldsTable, dto);
    target.add(getFieldsTable());
}
Also used : ReportDto(com.evolveum.midpoint.web.page.admin.reports.dto.ReportDto) JasperReportFieldDto(com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportFieldDto)

Aggregations

JasperReportFieldDto (com.evolveum.midpoint.web.page.admin.reports.dto.JasperReportFieldDto)4 AjaxButton (com.evolveum.midpoint.web.component.AjaxButton)1 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)1 ListDataProvider (com.evolveum.midpoint.web.component.util.ListDataProvider)1 ReportDto (com.evolveum.midpoint.web.page.admin.reports.dto.ReportDto)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1