use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class ReportMainPanel method createTabsForCollectionReports.
private List<ITab> createTabsForCollectionReports(PageAdminObjectDetails<ReportType> parentPage) {
List<ITab> tabs = new ArrayList<>();
tabs.add(new PanelTab(parentPage.createStringResource("ObjectCollectionReportEngineConfigurationType.collection")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return new SingleContainerPanel(panelId, PrismContainerWrapperModel.fromContainerWrapper(getObjectModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_COLLECTION)), GuiObjectListViewType.COMPLEX_TYPE);
}
@Override
public boolean isVisible() {
return hasDefinitionFor(ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_COLLECTION));
}
});
tabs.add(new PanelTab(parentPage.createStringResource("ObjectCollectionReportEngineConfigurationType.view")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
RepeatingView panel = new RepeatingView(panelId);
PrismPropertyWrapperModel<ReportType, Object> propertyModel = PrismPropertyWrapperModel.fromContainerWrapper(getObjectModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_VIEW, GuiObjectListViewType.F_TYPE));
try {
Panel propertyPanel = parentPage.initItemPanel(panel.newChildId(), propertyModel.getObject().getTypeName(), propertyModel, null);
panel.add(propertyPanel);
} catch (SchemaException e) {
LOGGER.error("Couldn't create panel for type element in view");
}
panel.add(createObjectListForColumns(panel.newChildId(), parentPage));
return panel;
}
@Override
public boolean isVisible() {
return hasDefinitionFor(ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_VIEW));
}
});
tabs.add(new PanelTab(parentPage.createStringResource("ObjectCollectionReportEngineConfigurationType.parameter")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return createObjectListForParameters(panelId, parentPage);
}
@Override
public boolean isVisible() {
return hasDefinitionFor(ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_PARAMETER));
}
});
tabs.add(new PanelTab(parentPage.createStringResource("ObjectCollectionReportEngineConfigurationType.subreport")) {
@Override
public WebMarkupContainer createPanel(String panelId) {
return createObjectListForSubreports(panelId, parentPage);
}
@Override
public boolean isVisible() {
return hasDefinitionFor(ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_SUBREPORT));
}
});
return tabs;
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class EngineReportTabPanel method initLayout.
@Override
protected void initLayout() {
RepeatingView panel = new RepeatingView(ID_PANEL);
add(panel);
if (hasDefinition(ReportType.F_DASHBOARD)) {
panel.add(new SingleContainerPanel(panel.newChildId(), PrismContainerWrapperModel.fromContainerWrapper(getModel(), ItemPath.create(ReportType.F_DASHBOARD)), DashboardReportEngineConfigurationType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
if (!ItemPath.create(ReportType.F_DASHBOARD, DashboardReportEngineConfigurationType.F_DASHBOARD_REF).equivalent(itemWrapper.getPath()) && !ItemPath.create(ReportType.F_DASHBOARD, DashboardReportEngineConfigurationType.F_SHOW_ONLY_WIDGETS_TABLE).equivalent(itemWrapper.getPath())) {
return ItemVisibility.HIDDEN;
}
return super.getVisibility(itemWrapper);
}
});
}
if (hasDefinition(ReportType.F_OBJECT_COLLECTION)) {
panel.add(new SingleContainerPanel(panel.newChildId(), PrismContainerWrapperModel.fromContainerWrapper(getModel(), ItemPath.create(ReportType.F_OBJECT_COLLECTION)), ObjectCollectionReportEngineConfigurationType.COMPLEX_TYPE) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
if (!ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_CONDITION).equivalent(itemWrapper.getPath()) && !ItemPath.create(ReportType.F_OBJECT_COLLECTION, ObjectCollectionReportEngineConfigurationType.F_USE_ONLY_REPORT_VIEW).equivalent(itemWrapper.getPath())) {
return ItemVisibility.HIDDEN;
}
return super.getVisibility(itemWrapper);
}
});
}
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class TaskWorkPanel method initLayout.
@Override
protected void initLayout() {
SingleContainerPanel activityDefinitionPanel = new SingleContainerPanel(ID_MAIN_PANEL, getObjectWrapperModel(), getPanelConfiguration());
add(activityDefinitionPanel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class TaskBasicPanel method initLayout.
protected void initLayout() {
SingleContainerPanel mainPanel = new SingleContainerPanel(ID_MAIN_PANEL, getObjectWrapperModel(), getPanelConfiguration()) {
@Override
protected ItemVisibility getVisibility(ItemWrapper itemWrapper) {
return getBasicTabVisibility(itemWrapper.getPath());
}
@Override
protected ItemEditabilityHandler getEditabilityHandler() {
return wrapper -> getBasicTabEditability(wrapper.getPath());
}
@Override
protected IModel<PrismContainerWrapper> createVirtualContainerModel(VirtualContainersSpecificationType virtualContainer) {
if (isDeprecatedVirtualContainer(virtualContainer)) {
return null;
}
return super.createVirtualContainerModel(virtualContainer);
}
};
add(mainPanel);
}
use of com.evolveum.midpoint.gui.impl.prism.panel.SingleContainerPanel in project midpoint by Evolveum.
the class TaskDistributionPanel method initLayout.
@Override
protected void initLayout() {
SingleContainerPanel activityDefinitionPanel = new SingleContainerPanel(ID_MAIN_PANEL, getObjectWrapperModel(), getPanelConfiguration());
add(activityDefinitionPanel);
}
Aggregations