use of com.evolveum.midpoint.gui.impl.prism.panel.ObjectTemplateItemPanel 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;
}
Aggregations