Search in sources :

Example 1 with BasicMultivalueContainerListPanel

use of com.evolveum.midpoint.gui.impl.component.BasicMultivalueContainerListPanel in project midpoint by Evolveum.

the class ReportMainPanel method createObjectListForColumns.

private WebMarkupContainer createObjectListForColumns(String panelId, PageAdminObjectDetails<ReportType> parentPage) {
    return new BasicMultivalueContainerListPanel<>(panelId, GuiObjectColumnType.class) {

        @Override
        protected MultivalueContainerDetailsPanel<GuiObjectColumnType> getMultivalueContainerDetailsPanel(ListItem<PrismContainerValueWrapper<GuiObjectColumnType>> item) {
            return createDetailsPanelForColumn(ID_ITEM_DETAILS, item);
        }

        @Override
        protected String getContainerNameForNewButton() {
            return getPageBase().createStringResource("GuiObjectListViewType.column").getString();
        }

        @Override
        protected IModel<PrismContainerWrapper<GuiObjectColumnType>> getContainerModel() {
            return PrismContainerWrapperModel.fromContainerWrapper(ReportMainPanel.this.getObjectModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_VIEW, GuiObjectListViewType.F_COLUMN));
        }

        @Override
        protected Component createHeader(String headerId) {
            Label label = new Label(headerId, getPageBase().createStringResource("EngineReportTabPanel.columns"));
            label.add(AttributeAppender.append("style", "padding-bottom:10px; font-size: 16px; font-weight: 600; color: #3c8dbc;"));
            return label;
        }

        @Override
        protected List<IColumn<PrismContainerValueWrapper<GuiObjectColumnType>, String>> createDefaultColumns() {
            return createColumnsForColumns(parentPage);
        }
    };
}
Also used : BasicMultivalueContainerListPanel(com.evolveum.midpoint.gui.impl.component.BasicMultivalueContainerListPanel) IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) PrismContainerWrapper(com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper) Label(org.apache.wicket.markup.html.basic.Label) ListItem(org.apache.wicket.markup.html.list.ListItem)

Example 2 with BasicMultivalueContainerListPanel

use of com.evolveum.midpoint.gui.impl.component.BasicMultivalueContainerListPanel in project midpoint by Evolveum.

the class ReportCollectionViewPanel method createObjectListForColumns.

private WebMarkupContainer createObjectListForColumns() {
    return new BasicMultivalueContainerListPanel<>(ID_COLUMNS_TABLE, GuiObjectColumnType.class) {

        @Override
        protected MultivalueContainerDetailsPanel<GuiObjectColumnType> getMultivalueContainerDetailsPanel(ListItem<PrismContainerValueWrapper<GuiObjectColumnType>> item) {
            return createDetailsPanelForColumn(item);
        }

        @Override
        protected String getContainerNameForNewButton() {
            return getPageBase().createStringResource("GuiObjectListViewType.column").getString();
        }

        @Override
        protected IModel<PrismContainerWrapper<GuiObjectColumnType>> getContainerModel() {
            return PrismContainerWrapperModel.fromContainerWrapper(getObjectWrapperModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_VIEW, GuiObjectListViewType.F_COLUMN));
        }

        @Override
        protected Component createHeader(String headerId) {
            Label label = new Label(headerId, getPageBase().createStringResource("EngineReportTabPanel.columns"));
            label.add(AttributeAppender.append("style", "padding-bottom:10px; font-size: 16px; font-weight: 600; color: #3c8dbc;"));
            return label;
        }

        @Override
        protected List<IColumn<PrismContainerValueWrapper<GuiObjectColumnType>, String>> createDefaultColumns() {
            return createColumnsForViewTable();
        }
    };
}
Also used : BasicMultivalueContainerListPanel(com.evolveum.midpoint.gui.impl.component.BasicMultivalueContainerListPanel) IColumn(org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn) PrismContainerWrapper(com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper) Label(org.apache.wicket.markup.html.basic.Label) ListItem(org.apache.wicket.markup.html.list.ListItem)

Aggregations

PrismContainerWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper)2 BasicMultivalueContainerListPanel (com.evolveum.midpoint.gui.impl.component.BasicMultivalueContainerListPanel)2 IColumn (org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn)2 Label (org.apache.wicket.markup.html.basic.Label)2 ListItem (org.apache.wicket.markup.html.list.ListItem)2