use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class RelationDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<RelationDefinitionType> 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("RelationDefinitionType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> {
QName component = getModelObject().getRef();
return component != null ? component.getLocalPart() : null;
};
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
Aggregations