use of com.evolveum.midpoint.gui.api.component.tabs.PanelTab in project midpoint by Evolveum.
the class FocusMainPanel method createTabs.
@Override
protected List<ITab> createTabs(final PageAdminObjectDetails<F> parentPage) {
List<ITab> tabs = new ArrayList<>();
List<ObjectFormType> objectFormTypes = parentPage.getObjectFormTypes();
// default tabs are always added to component structure, visibility is decided later in
// visible behavior based on adminGuiConfiguration
addDefaultTabs(parentPage, tabs);
addSpecificTabs(parentPage, tabs);
if (objectFormTypes == null) {
return tabs;
}
for (ObjectFormType objectFormType : objectFormTypes) {
final FormSpecificationType formSpecificationType = objectFormType.getFormSpecification();
if (formSpecificationType == null) {
continue;
}
String title = formSpecificationType.getTitle();
if (title == null) {
title = "pageAdminFocus.extended";
}
if (StringUtils.isEmpty(formSpecificationType.getPanelClass())) {
continue;
}
tabs.add(new PanelTab(parentPage.createStringResource(title)) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return createTabPanel(panelId, formSpecificationType, parentPage);
}
});
}
return tabs;
}
use of com.evolveum.midpoint.gui.api.component.tabs.PanelTab 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;
}
use of com.evolveum.midpoint.gui.api.component.tabs.PanelTab in project midpoint by Evolveum.
the class PageMergeObjects method createMainPanel.
@Override
protected AbstractObjectMainPanel<UserType> createMainPanel(String id) {
return new FocusMainPanel<UserType>(id, getObjectModel(), new CountableLoadableModel<AssignmentEditorDto>() {
@Override
protected List<AssignmentEditorDto> load() {
return new ArrayList<>();
}
}, new LoadableModel<List<FocusSubwrapperDto<ShadowType>>>() {
@Override
protected List<FocusSubwrapperDto<ShadowType>> load() {
return new ArrayList<>();
}
}, this) {
@Override
protected List<ITab> createTabs(final PageAdminObjectDetails<UserType> parentPage) {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(parentPage.createStringResource("PageMergeObjects.tabTitle"), new VisibleEnableBehaviour()) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
mergeObjectsPanel = new MergeObjectsPanel(panelId, mergeObjectModel, mergeWithObjectModel, type, PageMergeObjects.this);
return mergeObjectsPanel;
}
});
return tabs;
}
@Override
protected boolean isPreviewButtonVisible() {
return false;
}
@Override
protected boolean getOptionsPanelVisibility() {
return false;
}
};
}
Aggregations