use of com.evolveum.midpoint.web.component.assignment.SwitchAssignmentTypePanel in project midpoint by Evolveum.
the class AbstractRoleMainPanel method createTabs.
@Override
protected List<ITab> createTabs(final PageAdminObjectDetails<R> parentPage) {
List<ITab> tabs = super.createTabs(parentPage);
tabs.add(new PanelTab(parentPage.createStringResource("pageAdminFocus.applicablePolicies"), getTabVisibility(ComponentConstants.UI_FOCUS_TAB_APPLICABLE_POLICIES_URL, false, parentPage)) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return new FocusApplicablePoliciesTabPanel<>(panelId, getObjectModel());
}
});
tabs.add(new CountablePanelTab(parentPage.createStringResource("FocusType.inducement"), getTabVisibility(ComponentConstants.UI_FOCUS_TAB_INDUCEMENTS_URL, false, parentPage)) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
SwitchAssignmentTypePanel panel = new SwitchAssignmentTypePanel(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), AbstractRoleType.F_INDUCEMENT), new ContainerPanelConfigurationType()) {
private static final long serialVersionUID = 1L;
@Override
protected boolean isInducement() {
return true;
}
};
return panel;
}
@Override
public String getCount() {
return getInducementsCount();
}
});
tabs.add(new PanelTab(parentPage.createStringResource("pageRole.members"), getTabVisibility(ComponentConstants.UI_FOCUS_TAB_MEMBERS_URL, false, parentPage)) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return createMemberPanel(panelId, parentPage);
}
@Override
public boolean isVisible() {
return super.isVisible() && getObjectWrapper().getStatus() != ItemStatus.ADDED && isAllowedToReadRoleMembership(getObjectWrapper().getOid(), parentPage);
}
});
tabs.add(new PanelTab(parentPage.createStringResource("pageRole.governance"), getTabVisibility(ComponentConstants.UI_FOCUS_TAB_GOVERNANCE_URL, false, parentPage)) {
private static final long serialVersionUID = 1L;
@Override
public WebMarkupContainer createPanel(String panelId) {
return createGovernancePanel(panelId, parentPage);
}
@Override
public boolean isVisible() {
return super.isVisible() && getObjectWrapper().getStatus() != ItemStatus.ADDED;
}
});
return tabs;
}
use of com.evolveum.midpoint.web.component.assignment.SwitchAssignmentTypePanel in project midpoint by Evolveum.
the class AssignmentHolderTypeAssignmentsTabPanel method initLayout.
private void initLayout() {
WebMarkupContainer assignments = new WebMarkupContainer(ID_ASSIGNMENTS);
assignments.setOutputMarkupId(true);
add(assignments);
PrismContainerWrapperModel<AHT, AssignmentType> model = PrismContainerWrapperModel.fromContainerWrapper(getObjectWrapperModel(), AssignmentHolderType.F_ASSIGNMENT);
SwitchAssignmentTypePanel panel = createPanel(ID_ASSIGNMENTS_PANEL, model);
assignments.add(panel);
}
Aggregations