@Override protected void writeBrowserTooOldPage(VaadinRequest request, VaadinResponse response) throws IOException { try (BufferedWriter page = new BufferedWriter(new OutputStreamWriter( response.getOutputStream(), StandardCharsets.UTF_8))) { Locale locale = request.getLocale(); ParamsMap paramsMap = ParamsMap.of() .pair("captionMessage", messages.getMainMessage("unsupportedPage.captionMessage", locale)) .pair("descriptionMessage", messages.getMainMessage("unsupportedPage.descriptionMessage", locale)) .pair("browserListCaption", messages.getMainMessage("unsupportedPage.browserListCaption", locale)) .pair("chromeMessage", messages.getMainMessage("unsupportedPage.chromeMessage", locale)) .pair("firefoxMessage", messages.getMainMessage("unsupportedPage.firefoxMessage", locale)) .pair("safariMessage", messages.getMainMessage("unsupportedPage.safariMessage", locale)) .pair("operaMessage", messages.getMainMessage("unsupportedPage.operaMessage", locale)) .pair("edgeMessage", messages.getMainMessage("unsupportedPage.edgeMessage", locale)) .pair("explorerMessage", messages.getMainMessage("unsupportedPage.explorerMessage", locale)); String template = resources.getResourceAsString(webConfig.getUnsupportedPagePath()); String pageContent = TemplateHelper.processTemplate(template, paramsMap.create()); page.write(pageContent); } } }
protected void showPivotTable(ShowPivotMode mode) { ParamsMap paramsMap = ParamsMap.of(); if (mode == ALL_ROWS) { paramsMap.pair("dataItems", convertEntitiesToDataItems(target.getDatasource().getItems())); } else { paramsMap.pair("dataItems", convertEntitiesToDataItems(target.getSelected())); } paramsMap.pair("properties", getPropertiesWithLocale()); paramsMap.pair("nativeJson", nativeJson); WindowManager wm = target.getFrame().getWindowManager(); WindowConfig windowConfig = AppBeans.get(WindowConfig.NAME); wm.openWindow(windowConfig.getWindowInfo(SCREEN_ID), WindowManager.OpenType.NEW_TAB, paramsMap.create()); }
.pair("metaClass", builder.getMetaClass()) .pair("selected", builder.getEntities()) .pair("exclude", builder.getExclude()) .pair("includeProperties", builder.getIncludeProperties() != null ? builder.getIncludeProperties() : Collections.emptyList()) .pair("fieldValidators", builder.getFieldValidators()) .pair("modelValidators", builder.getModelValidators()) .pair("loadDynamicAttributes", builder.isLoadDynamicAttributes()) .pair("useConfirmDialog", builder.isUseConfirmDialog()) .create());
.pair("metaClass", target.getDatasource().getMetaClass()) .pair("selected", target.getSelected()) .pair("exclude", exclude) .pair("includeProperties", includeProperties != null ? includeProperties : Collections.EMPTY_LIST) .pair("fieldValidators", fieldValidators) .pair("modelValidators", modelValidators) .pair("loadDynamicAttributes", loadDynamicAttributes) .pair("useConfirmDialog", useConfirmDialog) .create();