Search in sources :

Example 1 with ProjectionDisplayNamePanel

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

the class FocusProjectionsTabPanel method getMultivalueContainerDetailsPanel.

private MultivalueContainerDetailsPanel<ShadowType> getMultivalueContainerDetailsPanel(ListItem<PrismContainerValueWrapper<ShadowType>> item) {
    MultivalueContainerDetailsPanel<ShadowType> detailsPanel = new MultivalueContainerDetailsPanel<ShadowType>(MultivalueContainerListPanelWithDetailsPanel.ID_ITEM_DETAILS, item.getModel(), false) {

        private static final long serialVersionUID = 1L;

        @Override
        protected DisplayNamePanel<ShadowType> createDisplayNamePanel(String displayNamePanelId) {
            IModel<ShadowType> shadowModel = new IModel<ShadowType>() {

                @Override
                public ShadowType getObject() {
                    return createShadowType(item.getModel());
                }
            };
            return new ProjectionDisplayNamePanel(displayNamePanelId, shadowModel);
        }

        @Override
        @NotNull
        protected List<ITab> createTabs() {
            List<ITab> tabs = super.createTabs();
            tabs.add(new PanelTab(createStringResource("ShadowType.basic")) {

                @Override
                public WebMarkupContainer createPanel(String panelId) {
                    ShadowPanel shadowPanel = new ShadowPanel(panelId, getParentModel(getModel()));
                    return shadowPanel;
                }
            });
            return tabs;
        }
    };
    return detailsPanel;
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) IModel(org.apache.wicket.model.IModel) ProjectionDisplayNamePanel(com.evolveum.midpoint.gui.impl.component.ProjectionDisplayNamePanel) MultivalueContainerDetailsPanel(com.evolveum.midpoint.gui.impl.component.MultivalueContainerDetailsPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ShadowPanel(com.evolveum.midpoint.gui.impl.prism.panel.ShadowPanel)

Example 2 with ProjectionDisplayNamePanel

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

the class FocusProjectionsPanel method getMultivalueContainerDetailsPanel.

private MultivalueContainerDetailsPanel<ShadowType> getMultivalueContainerDetailsPanel(ListItem<PrismContainerValueWrapper<ShadowType>> item) {
    MultivalueContainerDetailsPanel<ShadowType> detailsPanel = new MultivalueContainerDetailsPanel<ShadowType>(MultivalueContainerListPanelWithDetailsPanel.ID_ITEM_DETAILS, item.getModel(), false) {

        private static final long serialVersionUID = 1L;

        @Override
        protected DisplayNamePanel<ShadowType> createDisplayNamePanel(String displayNamePanelId) {
            IModel<ShadowType> shadowModel = () -> createShadowType(item.getModel());
            return new ProjectionDisplayNamePanel(displayNamePanelId, shadowModel);
        }

        @Override
        @NotNull
        protected List<ITab> createTabs() {
            List<ITab> tabs = super.createTabs();
            tabs.add(new PanelTab(createStringResource("ShadowType.basic")) {

                @Override
                public WebMarkupContainer createPanel(String panelId) {
                    ContainerPanelConfigurationType config = getBasicShadowPanelConfiguration(getModelObject().getRealValue());
                    ShadowPanel shadowPanel = new ShadowPanel(panelId, getParentModel(getModel()), config);
                    return shadowPanel;
                }
            });
            return tabs;
        }
    };
    return detailsPanel;
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ProjectionDisplayNamePanel(com.evolveum.midpoint.gui.impl.component.ProjectionDisplayNamePanel) MultivalueContainerDetailsPanel(com.evolveum.midpoint.gui.impl.component.MultivalueContainerDetailsPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ShadowPanel(com.evolveum.midpoint.gui.impl.prism.panel.ShadowPanel)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)2 MultivalueContainerDetailsPanel (com.evolveum.midpoint.gui.impl.component.MultivalueContainerDetailsPanel)2 ProjectionDisplayNamePanel (com.evolveum.midpoint.gui.impl.component.ProjectionDisplayNamePanel)2 ShadowPanel (com.evolveum.midpoint.gui.impl.prism.panel.ShadowPanel)2 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)2 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)2 IModel (org.apache.wicket.model.IModel)1