use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class GlobalPolicyRuleDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<GlobalPolicyRuleType> 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("GlobalPolicyRuleType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getName();
}
@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 SmsTransportDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<SmsTransportConfigurationType> 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("SmsTransportConfigurationType.label");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getName();
}
@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 ConfigurableUserDashboardDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<ConfigurableUserDashboardType> 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("ConfigurableUserDashboardType.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 ReportCollectionParameterPanel method createDetailsPanelForParameter.
private MultivalueContainerDetailsPanel<SearchFilterParameterType> createDetailsPanelForParameter(ListItem<PrismContainerValueWrapper<SearchFilterParameterType>> item) {
return new MultivalueContainerDetailsPanel<>(MultivalueContainerListPanelWithDetailsPanel.ID_ITEM_DETAILS, item.getModel(), true) {
@Override
protected DisplayNamePanel<SearchFilterParameterType> createDisplayNamePanel(String displayNamePanelId) {
return new DisplayNamePanel<>(displayNamePanelId, new ItemRealValueModel<>(getModel())) {
@Override
protected IModel<String> createHeaderModel() {
return () -> {
SearchFilterParameterType parameter = getModelObject();
String name = parameter.getName();
if (parameter.getDisplay() != null && parameter.getDisplay().getLabel() != null) {
name = WebComponentUtil.getTranslatedPolyString(parameter.getDisplay().getLabel());
}
return name;
};
}
@Override
protected String createImageModel() {
return "fa fa-sliders";
}
};
}
@Override
protected ItemVisibility getBasicTabVisibity(ItemWrapper<?, ?> itemWrapper) {
if (ItemPath.create(itemWrapper.getParent().getPath(), SearchFilterParameterType.F_DISPLAY).equivalent(itemWrapper.getPath())) {
return ItemVisibility.HIDDEN;
}
return super.getBasicTabVisibity(itemWrapper);
}
@Override
@NotNull
protected List<ITab> createTabs() {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(createStringResource("SearchFilterParameterType.display")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new SingleContainerPanel<>(panelId, PrismContainerWrapperModel.fromContainerValueWrapper(getModel(), SearchFilterParameterType.F_DISPLAY), DisplayType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
if (ItemPath.create(itemWrapper.getParent().getPath(), DisplayType.F_LABEL).equivalent(itemWrapper.getPath()) || ItemPath.create(itemWrapper.getParent().getPath(), DisplayType.F_HELP).equivalent(itemWrapper.getPath())) {
return super.getVisibility(itemWrapper);
}
return ItemVisibility.HIDDEN;
}
};
}
});
return tabs;
}
};
}
use of com.evolveum.midpoint.gui.api.component.DisplayNamePanel in project midpoint by Evolveum.
the class TemplateContentDetailsPanel method createDisplayNamePanel.
@Override
protected DisplayNamePanel<LocalizedMessageTemplateContentType> 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("LocalizedMessageTemplateContentType.language");
}
@Override
protected IModel<String> getDescriptionLabelModel() {
return () -> getModelObject().getLanguage();
}
@Override
protected WebMarkupContainer createTypeImagePanel(String idTypeImage) {
WebMarkupContainer c = new WebMarkupContainer(idTypeImage);
c.setVisible(false);
return c;
}
};
return d;
}
Aggregations