Search in sources :

Example 1 with ListMappingPanel

use of com.evolveum.midpoint.gui.impl.prism.panel.ListMappingPanel in project midpoint by Evolveum.

the class PageObjectTemplate method getTabs.

private List<ITab> getTabs() {
    List<ITab> tabs = new ArrayList<>();
    tabs.add(new PanelTab(createStringResource("pageObjectTemplate.basic.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new ObjectBasicPanel<ObjectTemplateType>(panelId, getObjectModel()) {

                @Override
                protected QName getType() {
                    return ObjectTemplateType.COMPLEX_TYPE;
                }

                @Override
                protected ItemVisibility getBasicTabVisibility(ItemWrapper<?, ?> itemWrapper) {
                    if (itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create(ItemPath.EMPTY_PATH, ObjectTemplateType.F_SUBTYPE)) || itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create(ItemPath.EMPTY_PATH, ObjectTemplateType.F_DIAGNOSTIC_INFORMATION)) || itemWrapper.getPath().isSubPathOrEquivalent(ItemPath.create(ItemPath.EMPTY_PATH, ObjectTemplateType.F_LIFECYCLE_STATE))) {
                        return ItemVisibility.HIDDEN;
                    }
                    return ItemVisibility.AUTO;
                }
            };
        }
    });
    tabs.add(new PanelTab(createStringResource("pageObjectTemplate.iterationSpecification.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new SingleContainerPanel<IterationSpecificationType>(panelId, createModel(getObjectModel(), ObjectTemplateType.F_ITERATION_SPECIFICATION), IterationSpecificationType.COMPLEX_TYPE);
        }
    });
    tabs.add(new PanelTab(createStringResource("pageObjectTemplate.item.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new ObjectTemplateItemPanel(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ObjectTemplateType.F_ITEM));
        }
    });
    tabs.add(new PanelTab(createStringResource("pageObjectTemplate.mapping.title")) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new ListMappingPanel(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ObjectTemplateType.F_MAPPING));
        }
    });
    return tabs;
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) ListMappingPanel(com.evolveum.midpoint.gui.impl.prism.panel.ListMappingPanel) QName(javax.xml.namespace.QName) ArrayList(java.util.ArrayList) ObjectTemplateItemPanel(com.evolveum.midpoint.gui.impl.prism.panel.ObjectTemplateItemPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ItemVisibility(com.evolveum.midpoint.web.component.prism.ItemVisibility)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)1 ListMappingPanel (com.evolveum.midpoint.gui.impl.prism.panel.ListMappingPanel)1 ObjectTemplateItemPanel (com.evolveum.midpoint.gui.impl.prism.panel.ObjectTemplateItemPanel)1 ItemVisibility (com.evolveum.midpoint.web.component.prism.ItemVisibility)1 ArrayList (java.util.ArrayList)1 QName (javax.xml.namespace.QName)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1