protected void initOutputTypeList() { ArrayList<ReportOutputType> outputTypes = new ArrayList<>(Arrays.asList(ReportOutputType.values())); if (!windowConfig.hasWindow(ShowChartController.JSON_CHART_SCREEN_ID)) { outputTypes.remove(ReportOutputType.CHART); } if (!windowConfig.hasWindow(ShowPivotTableController.PIVOT_TABLE_SCREEN_ID)) { outputTypes.remove(ReportOutputType.PIVOT_TABLE); } outputType.setOptionsList(outputTypes); }
public String getAvailableLookupScreenId(MetaClass metaClass) { String id = getLookupScreenId(metaClass); if (!hasWindow(id)) { id = getBrowseScreenId(metaClass); } return id; }
protected Map<String, TemplateFileType> getAvailableTemplateFormats() { Messages messages = AppBeans.get(Messages.NAME); Map<String, TemplateFileType> result = new LinkedHashMap<>(4); result.put(messages.getMessage(TemplateFileType.XLSX), TemplateFileType.XLSX); result.put(messages.getMessage(TemplateFileType.DOCX), TemplateFileType.DOCX); result.put(messages.getMessage(TemplateFileType.HTML), TemplateFileType.HTML); result.put(messages.getMessage(TemplateFileType.CSV), TemplateFileType.CSV); WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); if (windowConfig.hasWindow(ShowChartController.JSON_CHART_SCREEN_ID)) { result.put(messages.getMessage(TemplateFileType.CHART), TemplateFileType.CHART); } return result; }
if (ann != null) { String editFrameId = ann.editFrameId(); if (StringUtils.isNotBlank(editFrameId) && !windowConfig.hasWindow(editFrameId)) { throw new IllegalArgumentException( String.format("Unable to find %s edit screen in screen config for widget %s",
if (config.hasWindow(currentWindowAlias)) { ((LegacyFrame) lookupWindow).openLookup( currentWindowAlias,
if (!windowConfig.hasWindow(defaultScreenId)) { log.info("Can't find default screen: {}", defaultScreenId); return;
@Override public void init(final Map<String, Object> params) { super.init(params); getDialogOptions() .setWidth(themeConstants.get("cuba.gui.report.ShowChartController.width")) .setHeight(themeConstants.get("cuba.gui.report.ShowChartController.height")) .setResizable(true); String chartJson = (String) params.get(CHART_JSON_PARAMETER); report = (Report) params.get(REPORT_PARAMETER); templateCode = (String) params.get(TEMPLATE_CODE_PARAMETER); @SuppressWarnings("unchecked") Map<String, Object> reportParameters = (Map<String, Object>) params.get(PARAMS_PARAMETER); if (!windowConfig.hasWindow(JSON_CHART_SCREEN_ID)) { showChartsNotIncluded(); return; } if (report != null) { reportSelectorBox.setVisible(false); initFrames(chartJson, reportParameters); } else { showDiagramStubText(); } reportLookup.addValueChangeListener(e -> { report = (Report) e.getValue(); initFrames(null, null); }); }