Search in sources :

Example 1 with RolePolicyPanel

use of com.evolveum.midpoint.web.page.admin.roles.RolePolicyPanel in project midpoint by Evolveum.

the class RoleMainPanel method createTabs.

@Override
protected List<ITab> createTabs(final PageAdminObjectDetails<RoleType> parentPage) {
    List<ITab> tabs = super.createTabs(parentPage);
    FocusTabVisibleBehavior authorization = new FocusTabVisibleBehavior(unwrapModel(), ComponentConstants.UI_FOCUS_TAB_GOVERNANCE_URL);
    tabs.add(new PanelTab(parentPage.createStringResource("pageRole.governance"), authorization) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return createGovernancePanel(panelId);
        }

        @Override
        public boolean isVisible() {
            return super.isVisible() && getObjectWrapper().getStatus() != ContainerStatus.ADDING;
        }
    });
    authorization = new FocusTabVisibleBehavior(unwrapModel(), ComponentConstants.UI_FOCUS_TAB_POLICY_CONSTRAINTS_URL);
    tabs.add(new PanelTab(parentPage.createStringResource("AbstractRoleType.policyConstraints"), authorization) {

        private static final long serialVersionUID = 1L;

        @Override
        public WebMarkupContainer createPanel(String panelId) {
            return new RolePolicyPanel(panelId, getObject());
        }
    });
    authorization = new FocusTabVisibleBehavior(unwrapModel(), ComponentConstants.UI_FOCUS_TAB_MEMBERS_URL);
    return tabs;
}
Also used : PanelTab(com.evolveum.midpoint.gui.api.component.tabs.PanelTab) FocusTabVisibleBehavior(com.evolveum.midpoint.gui.api.util.FocusTabVisibleBehavior) RolePolicyPanel(com.evolveum.midpoint.web.page.admin.roles.RolePolicyPanel) ITab(org.apache.wicket.extensions.markup.html.tabs.ITab) WebMarkupContainer(org.apache.wicket.markup.html.WebMarkupContainer)

Aggregations

PanelTab (com.evolveum.midpoint.gui.api.component.tabs.PanelTab)1 FocusTabVisibleBehavior (com.evolveum.midpoint.gui.api.util.FocusTabVisibleBehavior)1 RolePolicyPanel (com.evolveum.midpoint.web.page.admin.roles.RolePolicyPanel)1 ITab (org.apache.wicket.extensions.markup.html.tabs.ITab)1 WebMarkupContainer (org.apache.wicket.markup.html.WebMarkupContainer)1