@Override public Map<String, Object> getParameters() { return ParamsMap.of( "format", formatPattern, "decimalSeparator", decimalSeparator, "groupingSeparator", groupingSeparator); }
@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 boolean isLookupWindow(WindowInfo winInfo) { Element element = screenXmlLoader.load(winInfo.getTemplate(), winInfo.getId(), ParamsMap.empty()); String screenClassName = element.attributeValue("class"); try { Class<?> screenClass = Class.forName(screenClassName); if (AbstractLookup.class.isAssignableFrom(screenClass)) { return true; } } catch (NullPointerException | ClassNotFoundException e) { return false; } return false; }
@Override public Map<String, Object> getParameters() { return ParamsMap.of("format", formatPattern); }
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()); }
/** * Open input parameters dialog if report has parameters otherwise print report * * @param report - target report * @param screen - caller window */ public void runReport(Report report, FrameOwner screen) { if (report == null) { throw new IllegalArgumentException("Can not run null report"); } if (report.getInputParameters() != null && report.getInputParameters().size() > 0 || inputParametersRequiredByTemplates(report)) { openReportParamsDialog(screen, report, null, null, null); } else { printReport(report, ParamsMap.empty(), screen); } }
@Override public Map<String, Object> getParameters() { return ParamsMap.of("format", formatPattern); }
ScreenOptions options = new MapScreenOptions(ParamsMap.of() .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());
@Override public void actionPerform(Component component) { if (substitutionsDs.getItem() != null) { Window editor = openEditor(substitutionsDs.getItem(), OpenType.DIALOG, ParamsMap.empty(), substitutionsDs); editor.addCloseListener(actionId -> { substTable.focus(); }); } } }
@Override public Map<String, Object> getParameters() { return ParamsMap.of("format", formatPattern); }
Map<String, Object> params = ParamsMap.of() .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();
@Override public void actionPerform(Component component) { UserSubstitution substitution = metadata.create(UserSubstitution.class); substitution.setUser(userDs.getItem()); Window editor = openEditor(substitution, OpenType.DIALOG, ParamsMap.empty(), substitutionsDs); editor.addCloseListener(actionId -> { substTable.focus(); }); } }
@Override public Map<String, Object> getParameters() { return ParamsMap.of("format", formatPattern); }
protected EnumValueFrame openEnumValueFrame(EnumParameterValue value) { return (EnumValueFrame) openFrame( valueBox, "dashboard$EnumValueFrame", ParamsMap.of(ValueFrame.VALUE, value) ); }
protected SimpleValueFrame openSimpleValueFrame(ParameterType type, ParameterValue parameterValue) { return (SimpleValueFrame) openFrame( valueBox, "dashboard$SimpleValueFrame", ParamsMap.of(ValueFrame.VALUE_TYPE, type, ValueFrame.VALUE, parameterValue) ); }
protected EntitiesListValueFrame openEntitiesListValueFrame(ListEntitiesParameterValue value) { return (EntitiesListValueFrame) openFrame( valueBox, "dashboard$EntitiesListValueFrame", ParamsMap.of(ValueFrame.VALUE, value) ); } }
protected EntityValueFrame openEntityValueFrame(EntityParameterValue value) { return (EntityValueFrame) openFrame( valueBox, "dashboard$EntityValueFrame", ParamsMap.of(ValueFrame.VALUE, value) ); }
@Override public Map<String, Object> getInitialValues() { return ParamsMap.of("group", groupsTree.getSingleSelected()); }
@Override public void ready() { taggableTagsDs.refresh(ParamsMap.of("entity", taggable)); }
public void applyFilter() { screenPermissionsTreeDs.refresh(ParamsMap.of("filtering", true)); } }