Search in sources :

Example 1 with AbstractRoleMainPanel

use of com.evolveum.midpoint.web.component.objectdetails.AbstractRoleMainPanel in project midpoint by Evolveum.

the class PageArchetype method createMainPanel.

@Override
protected AbstractObjectMainPanel<ArchetypeType> createMainPanel(String id) {
    return new AbstractRoleMainPanel<>(id, getObjectModel(), getProjectionModel(), this) {

        private static final long serialVersionUID = 1L;

        @Override
        public AbstractRoleMemberPanel<ArchetypeType> createMemberPanel(String panelId, PageBase pageBase) {
            return new ArchetypeMembersPanel(panelId, new Model<>(getObject().asObjectable()), pageBase);
        }

        @Override
        protected List<ITab> createTabs(PageAdminObjectDetails<ArchetypeType> parentPage) {
            List<ITab> tabs = super.createTabs(parentPage);
            tabs.add(new PanelTab(parentPage.createStringResource("PageArchetype.archetypePolicy"), getTabVisibility(ComponentConstants.UI_ARCHTYPE_TAB_ARCHETYPE_POLICY_URL, false, parentPage)) {

                private static final long serialVersionUID = 1L;

                @Override
                public WebMarkupContainer createPanel(String panelId) {
                    return new ContainerOfSystemConfigurationPanel<ArchetypePolicyType>(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ArchetypeType.F_ARCHETYPE_POLICY), ArchetypePolicyType.COMPLEX_TYPE);
                }
            });
            return tabs;
        }
    };
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) PageBase(com.evolveum.midpoint.gui.api.page.PageBase) PageAdminObjectDetails(com.evolveum.midpoint.web.page.admin.PageAdminObjectDetails) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer) ArchetypeType(com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypeType) AbstractRoleMainPanel(com.evolveum.midpoint.web.component.objectdetails.AbstractRoleMainPanel) ArchetypePolicyType(com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypePolicyType)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)1 PageBase (com.evolveum.midpoint.gui.api.page.PageBase)1 AbstractRoleMainPanel (com.evolveum.midpoint.web.component.objectdetails.AbstractRoleMainPanel)1 PageAdminObjectDetails (com.evolveum.midpoint.web.page.admin.PageAdminObjectDetails)1 ArchetypePolicyType (com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypePolicyType)1 ArchetypeType (com.evolveum.midpoint.xml.ns._public.common.common_3.ArchetypeType)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1