use of com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel in project midpoint by Evolveum.
the class AssignmentConstructionPanel method initLayout.
private void initLayout() {
SingleContainerPanel<ConstructionType> baseConstructionPanel = new SingleContainerPanel<>(ID_BASIC, getModel(), ConstructionType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
ItemPath itemPath = itemWrapper.getPath();
if (isAssociation(itemPath)) {
return ItemVisibility.HIDDEN;
}
if (isAttributePath(itemPath)) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_KIND.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_INTENT.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
if (ConstructionType.F_RESOURCE_REF.equivalent(itemPath.lastName())) {
return ItemVisibility.HIDDEN;
}
return ItemVisibility.AUTO;
}
};
add(baseConstructionPanel);
ResourceAttributePanel attrsPanel = new ResourceAttributePanel(ID_ATTRIBUTES, PrismContainerWrapperModel.fromContainerWrapper(getModel(), ConstructionType.F_ATTRIBUTE), null);
add(attrsPanel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel in project midpoint by Evolveum.
the class ResourceObjectTypeDetailsPanel method createTabs.
@Override
@NotNull
protected List<ITab> createTabs() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(createStringResource("Attributes")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new ResourceAttributePanel(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), ResourceObjectTypeDefinitionType.F_ATTRIBUTE), getConfig());
}
});
return tabs;
}
use of com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel in project midpoint by Evolveum.
the class ResourceSchemaHandlingPanel method createMultivalueContainerDetailsPanel.
private MultivalueContainerDetailsPanel<ResourceObjectTypeDefinitionType> createMultivalueContainerDetailsPanel(String panelId, IModel<PrismContainerValueWrapper<ResourceObjectTypeDefinitionType>> model) {
return new MultivalueContainerDetailsPanel<>(panelId, model, true) {
@Override
protected ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?> itemWrapper) {
if (itemWrapper instanceof PrismContainerWrapper) {
return ItemVisibility.HIDDEN;
}
return ItemVisibility.AUTO;
}
@Override
@NotNull
protected List<ITab> createTabs() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(createStringResource("ResourceSchemaHandlingPanel.tab.attributes")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new ResourceAttributePanel(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), ResourceObjectTypeDefinitionType.F_ATTRIBUTE), getPanelConfiguration());
}
});
return tabs;
}
@Override
protected DisplayNamePanel<ResourceObjectTypeDefinitionType> createDisplayNamePanel(String displayNamePanelId) {
return new DisplayNamePanel<>(displayNamePanelId, new ItemRealValueModel<>(getModel())) {
@Override
protected IModel<String> createHeaderModel() {
return new ReadOnlyModel<>(() -> loadHeaderModel(getModelObject()));
}
@Override
protected IModel<List<String>> getDescriptionLabelsModel() {
return new ReadOnlyModel<>(() -> loadDescriptionModel(getModelObject()));
}
};
}
};
}
use of com.evolveum.midpoint.gui.impl.prism.panel.ResourceAttributePanel in project midpoint by Evolveum.
the class ResourceSchemaHandlingTabPanel method createMultivalueContainerDetailsPanel.
private MultivalueContainerDetailsPanel<ResourceObjectTypeDefinitionType> createMultivalueContainerDetailsPanel(String panelId, IModel<PrismContainerValueWrapper<ResourceObjectTypeDefinitionType>> model) {
return new MultivalueContainerDetailsPanel<>(panelId, model, true) {
@Override
protected ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?> itemWrapper) {
if (itemWrapper instanceof PrismContainerWrapper) {
return ItemVisibility.HIDDEN;
}
return ItemVisibility.AUTO;
}
@Override
@NotNull
protected List<ITab> createTabs() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(createStringResource("Attributes")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new ResourceAttributePanel(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), ResourceObjectTypeDefinitionType.F_ATTRIBUTE), null);
}
});
return tabs;
}
@Override
protected DisplayNamePanel<ResourceObjectTypeDefinitionType> createDisplayNamePanel(String displayNamePanelId) {
return new DisplayNamePanel<>(displayNamePanelId, new ItemRealValueModel<>(getModel()));
}
};
}
Aggregations