use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel 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.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class GuiObjectDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<GuiObjectDetailsPageType> createDisplayNamePanel(String displayNamePanelId) {
// so far no display name panel needed
DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {
@Override
protected IModel<String> createHeaderModel() {
return createStringResource("GuiObjectDetailsPageType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getType().getLocalPart();
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class ObjectCollectionViewsDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<GuiObjectListViewType> createDisplayNamePanel(String displayNamePanelId) {
// so far no display name panel needed
DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {
@Override
protected IModel<String> createHeaderModel() {
return createStringResource("GuiObjectListViewType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getIdentifier();
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class ClassLoggerDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<ClassLoggerConfigurationType> createDisplayNamePanel(String displayNamePanelId) {
// so far no display name panel needed
DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {
@Override
protected IModel<String> createHeaderModel() {
return createStringResource("ClassLoggerConfigurationType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getPackage();
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class SubSystemLoggerDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<SubSystemLoggerConfigurationType> createDisplayNamePanel(String displayNamePanelId) {
// so far no display name panel needed
DisplayNamePanel d = new DisplayNamePanel<>(displayNamePanelId, Model.of(getModelObject().getRealValue())) {
@Override
protected IModel<String> createHeaderModel() {
return createStringResource("SubSystemLoggerConfigurationType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> {
LoggingComponentType component = getModelObject().getComponent();
return component != null ? component.value() : null;
};
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
Aggregations