use of com.evolveum.midpoint.xml.ns._public.common.common_3.ContainerPanelConfigurationType in project midpoint by Evolveum.
the class DetailsNavigationPanel method createDetailsSubNavigationPanel.
private DetailsNavigationPanel<O> createDetailsSubNavigationPanel(ListItem<ContainerPanelConfigurationType> item) {
DetailsNavigationPanel<O> subPanel = new DetailsNavigationPanel<>(ID_SUB_NAVIGATION, objectDetailsModel, new PropertyModel<>(item.getModel(), ContainerPanelConfigurationType.F_PANEL.getLocalPart())) {
@Override
protected void onClickPerformed(ContainerPanelConfigurationType config, AjaxRequestTarget target) {
if (config.getPath() == null) {
config.setPath(item.getModelObject().getPath());
}
target.add(DetailsNavigationPanel.this);
DetailsNavigationPanel.this.onClickPerformed(config, target);
}
};
subPanel.add(new VisibleBehaviour(() -> !item.getModelObject().getPanel().isEmpty()));
return subPanel;
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ContainerPanelConfigurationType in project midpoint by Evolveum.
the class DetailsNavigationPanel method getMenuItemIconClass.
private IModel<String> getMenuItemIconClass(IModel<ContainerPanelConfigurationType> item) {
return new ReadOnlyModel<>(() -> {
ContainerPanelConfigurationType config = item.getObject();
if (config == null || config.getDisplay() == null) {
return GuiStyleConstants.CLASS_CIRCLE_FULL;
}
String iconCss = WebComponentUtil.getIconCssClass(config.getDisplay());
return StringUtils.isNoneEmpty(iconCss) ? iconCss : GuiStyleConstants.CLASS_CIRCLE_FULL;
});
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ContainerPanelConfigurationType in project midpoint by Evolveum.
the class DetailsNavigationPanel method createNavigationDetailsStyleModel.
private IModel<String> createNavigationDetailsStyleModel(ListItem<ContainerPanelConfigurationType> item) {
return new ReadOnlyModel<>(() -> {
ContainerPanelConfigurationType storageConfig = getConfigurationFromStorage();
ContainerPanelConfigurationType itemModelObject = item.getModelObject();
if (isMenuActive(storageConfig, itemModelObject)) {
return "active open";
}
if (hasActiveSubmenu(storageConfig, itemModelObject)) {
return "open";
}
return "";
});
}
use of com.evolveum.midpoint.xml.ns._public.common.common_3.ContainerPanelConfigurationType in project midpoint by Evolveum.
the class DetailsNavigationPanel method getCounterProvider.
private SimpleCounter<ObjectDetailsModels<O>, O> getCounterProvider(IModel<ContainerPanelConfigurationType> panelModel) {
ContainerPanelConfigurationType config = panelModel.getObject();
String panelInstanceIdentifier = config.getIdentifier();
SimpleCounter<ObjectDetailsModels<O>, O> counter = getPageBase().getCounterProvider(panelInstanceIdentifier);
if (counter == null || counter.getClass().equals(SimpleCounter.class)) {
return null;
}
return counter;
}
Aggregations