Search in sources :

Example 1 with DisplayNamePanel

use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.

the class ResourceSchemaHandlingPanel method createMultivalueContainerDetailsPanel.

private MultivalueContainerDetailsPanel<ResourceObjectTypeDefinitionType> createMultivalueContainerDetailsPanel(String panelId, IModel<PrismContainerValueWrapper<ResourceObjectTypeDefinitionType>> model) {
    return new MultivalueContainerDetailsPanel<>(panelId, model, true) {

        @Override
        protected ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?> itemWrapper) {
            if (itemWrapper instanceof PrismContainerWrapper) {
                return ItemVisibility.HIDDEN;
            }
            return ItemVisibility.AUTO;
        }

        @Override
        @NotNull
        protected List<ITab> createTabs() {
            List<ITab> tabs = new ArrayList<>();
            tabs.add(new PanelTab(createStringResource("ResourceSchemaHandlingPanel.tab.attributes")) {

                @Override
                public WebMarkupContainer createPanel(String panelId) {
                    return new ResourceAttributePanel(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), ResourceObjectTypeDefinitionType.F_ATTRIBUTE), getPanelConfiguration());
                }
            });
            return tabs;
        }

        @Override
        protected DisplayNamePanel<ResourceObjectTypeDefinitionType> createDisplayNamePanel(String displayNamePanelId) {
            return new DisplayNamePanel<>(displayNamePanelId, new ItemRealValueModel<>(getModel())) {

                @Override
                protected IModel<String> createHeaderModel() {
                    return new ReadOnlyModel<>(() -> loadHeaderModel(getModelObject()));
                }

                @Override
                protected IModel<List<String>> getDescriptionLabelsModel() {
                    return new ReadOnlyModel<>(() -> loadDescriptionModel(getModelObject()));
                }
            };
        }
    };
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) MultivalueContainerDetailsPanel(com.evolveum.midpoint.gui.impl.component.MultivalueContainerDetailsPanel) PrismContainerWrapper(com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper) ArrayList(java.util.ArrayList) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ItemWrapper(com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper) DisplayNamePanel(com.evolveum.midpoint.gui.api.component.DisplayNamePanel) ReadOnlyModel(com.evolveum.midpoint.gui.api.model.ReadOnlyModel) ResourceAttributePanel(com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel) ArrayList(java.util.ArrayList) List(java.util.List)

Example 2 with DisplayNamePanel

use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.

the class GuiObjectDetailsPanel method createDisplayNamePanel.

@Override
protected DisplayNamePanel<GuiObjectDetailsPageType> createDisplayNamePanel(String displayNamePanelId) {
    // so far no display name panel needed
    DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {

        @Override
        protected IModel<String> createHeaderModel() {
            return createStringResource("GuiObjectDetailsPageType.label");
        }

        @Override
        protected IModel<String> getDescriptionLabelModel() {
            return () -> getModelObject().getType().getLocalPart();
        }

        @Override
        protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
            WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
            c.setVisible(false);
            return c;
        }
    };
    return d;
}
Also used : DisplayNamePanel(com.evolveum.midpoint.gui.api.component.DisplayNamePanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 3 with DisplayNamePanel

use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.

the class ObjectCollectionViewsDetailsPanel method createDisplayNamePanel.

@Override
protected DisplayNamePanel<GuiObjectListViewType> createDisplayNamePanel(String displayNamePanelId) {
    // so far no display name panel needed
    DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {

        @Override
        protected IModel<String> createHeaderModel() {
            return createStringResource("GuiObjectListViewType.label");
        }

        @Override
        protected IModel<String> getDescriptionLabelModel() {
            return () -> getModelObject().getIdentifier();
        }

        @Override
        protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
            WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
            c.setVisible(false);
            return c;
        }
    };
    return d;
}
Also used : DisplayNamePanel(com.evolveum.midpoint.gui.api.component.DisplayNamePanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 4 with DisplayNamePanel

use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.

the class ClassLoggerDetailsPanel method createDisplayNamePanel.

@Override
protected DisplayNamePanel<ClassLoggerConfigurationType> createDisplayNamePanel(String displayNamePanelId) {
    // so far no display name panel needed
    DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {

        @Override
        protected IModel<String> createHeaderModel() {
            return createStringResource("ClassLoggerConfigurationType.label");
        }

        @Override
        protected IModel<String> getDescriptionLabelModel() {
            return () -> getModelObject().getPackage();
        }

        @Override
        protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
            WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
            c.setVisible(false);
            return c;
        }
    };
    return d;
}
Also used : DisplayNamePanel(com.evolveum.midpoint.gui.api.component.DisplayNamePanel) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Example 5 with DisplayNamePanel

use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.

the class SubSystemLoggerDetailsPanel method createDisplayNamePanel.

@Override
protected DisplayNamePanel<SubSystemLoggerConfigurationType> createDisplayNamePanel(String displayNamePanelId) {
    // so far no display name panel needed
    DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {

        @Override
        protected IModel<String> createHeaderModel() {
            return createStringResource("SubSystemLoggerConfigurationType.label");
        }

        @Override
        protected IModel<String> getDescriptionLabelModel() {
            return () -> {
                LoggingComponentType component = getModelObject().getComponent();
                return component != null ? component.value() : null;
            };
        }

        @Override
        protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
            WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
            c.setVisible(false);
            return c;
        }
    };
    return d;
}
Also used : DisplayNamePanel(com.evolveum.midpoint.gui.api.component.DisplayNamePanel) LoggingComponentType(com.evolveum.midpoint.xml.ns._public.common.common_3.LoggingComponentType) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

DisplayNamePanel (com.evolveum.midpoint.gui.api.component.DisplayNamePanel)21 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)20 ItemWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.ItemWrapper)5 MultivalueContainerDetailsPanel (com.evolveum.midpoint.gui.impl.component.MultivalueContainerDetailsPanel)5 ArrayList (java.util.ArrayList)5 PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)4 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)4 PrismContainerWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerWrapper)3 ResourceAttributePanel (com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel)2 ItemVisibility (com.evolveum.midpoint.web.component.prism.ItemVisibility)2 ReadOnlyModel (com.evolveum.midpoint.gui.api.model.ReadOnlyModel)1 PrismContainerValueWrapper (com.evolveum.midpoint.gui.api.prism.wrapper.PrismContainerValueWrapper)1 MultivalueContainerListPanelWithDetailsPanel (com.evolveum.midpoint.gui.impl.component.MultivalueContainerListPanelWithDetailsPanel)1 PrismPropertyWrapperColumn (com.evolveum.midpoint.gui.impl.component.data.column.PrismPropertyWrapperColumn)1 CompositedIconBuilder (com.evolveum.midpoint.gui.impl.component.icon.CompositedIconBuilder)1 ItemRealValueModel (com.evolveum.midpoint.gui.impl.factory.panel.ItemRealValueModel)1 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)1 CheckBoxHeaderColumn (com.evolveum.midpoint.web.component.data.column.CheckBoxHeaderColumn)1 ColumnMenuAction (com.evolveum.midpoint.web.component.data.column.ColumnMenuAction)1 InlineMenuButtonColumn (com.evolveum.midpoint.web.component.data.column.InlineMenuButtonColumn)1