@Override public Map<String, Object> getParameters() { return ParamsMap.of( "format", formatPattern, "decimalSeparator", decimalSeparator, "groupingSeparator", groupingSeparator); }
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) ); } }
public void exportAsSql() { List<AppPropertyEntity> exported = paramsTable.getSelected().stream() .filter(appPropertyEntity -> !appPropertyEntity.getCategory()) .collect(Collectors.toList()); if (!exported.isEmpty()) { openWindow("appPropertiesExport", OpenType.DIALOG, ParamsMap.of("exported", exported)); } }
protected void setWidgetType() { String browseFrameId = widgetDs.getItem().getFrameId(); WidgetTypeInfo widgetType = typesInfo.stream() .filter(typeInfo -> browseFrameId.equals(typeInfo.getFrameId())) .findFirst().orElseThrow(() -> new RuntimeException("Unknown widget type")); Map<String, Object> params = new HashMap<>(ParamsMap.of(ITEM_DS, widgetDs)); params.putAll(widgetRepository.getWidgetParams(widgetDs.getItem())); if (StringUtils.isNotEmpty(widgetType.getEditFrameId())) { widgetEditFrame = openFrame(widgetEditBox, widgetType.getEditFrameId(), params); } }
protected void selectAttachmentDialog(SendingMessage message) { openLookup("sys$SendingMessage.attachments", items -> { if (items.size() == 1) { exportFile((SendingAttachment) IterableUtils.get(items, 0)); } }, OpenType.DIALOG, ParamsMap.of("message", message)); }
protected void initParametersFrame() { paramsFrame.init(ParamsMap.of( PARAMETERS, getItem().getParameters() )); }
@Override public void accept(HasValue.ValueChangeEvent e) { mbeanDs.refresh(ParamsMap.of("objectName", e.getValue())); if (StringUtils.isNotEmpty((String) e.getValue())) { mbeansTable.expandAll(); } } }
protected void openChart(String chartJson) { chartBox.removeAll(); if (chartJson != null) { openFrame(chartBox, JSON_CHART_SCREEN_ID, ParamsMap.of(CHART_JSON_PARAMETER, chartJson)); } showDiagramStubText(); }
protected void initCanvasFrame() { canvasFrame = (CanvasEditorFrame) openFrame(canvasBox, CanvasEditorFrame.SCREEN_NAME, ParamsMap.of( DASHBOARD, getDashboard() )); canvasBox.expand(canvasFrame); }
protected void handle404(String route) { Map<String, Object> params = ParamsMap.of("requestedRoute", route); MapScreenOptions options = new MapScreenOptions(params); getScreens().create(NotFoundScreen.class, OpenMode.NEW_TAB, options) .show(); }
@Override public TargetDetails convertTargetDetails(com.vaadin.event.dd.TargetDetails targetDetails) { com.haulmont.cuba.web.widgets.addons.dragdroplayouts.DDVerticalLayout.VerticalLayoutTargetDetails details = (com.haulmont.cuba.web.widgets.addons.dragdroplayouts.DDVerticalLayout.VerticalLayoutTargetDetails) targetDetails; Map<String, Object> dataDetails = ParamsMap.of( Constants.DROP_DETAIL_MOUSE_EVENT, details.getData(Constants.DROP_DETAIL_MOUSE_EVENT), Constants.DROP_DETAIL_TO, details.getOverIndex(), Constants.DROP_DETAIL_VERTICAL_DROP_LOCATION, details.getDropLocation(), Constants.DROP_DETAIL_LAYOUT_COMPONENTS, ownComponents ); return new DDVerticalLayoutTargetDetails(dataDetails, this); }
protected void setNode(JmxInstance currentNode) { statisticsDs.clear(); startTime = System.currentTimeMillis(); statisticsDs.refresh(ParamsMap.of("node", currentNode, "refreshPeriod", timerDelay)); statisticsDs.groupBy(new Object[]{new MetaPropertyPath(parameterClass, parameterClass.getPropertyNN("parameterGroup"))}); paramsTable.expandAll(); }
public void showInfo(Entity entity, MetaClass metaClass, Component.BelongToFrame component) { WindowManager wm = (WindowManager) ComponentsHelper.getScreenContext(component).getScreens(); WindowInfo windowInfo = AppBeans.get(WindowConfig.class).getWindowInfo("sysInfoWindow"); wm.openWindow(windowInfo, OpenType.DIALOG, ParamsMap.of( "metaClass", metaClass, "item", entity)); } }
protected void openReportParamsDialog(Report report, FrameOwner screen) { ScreenContext screenContext = UiControllerUtils.getScreenContext(screen); WindowManager wm = (WindowManager) screenContext.getScreens(); WindowInfo windowInfo = AppBeans.get(WindowConfig.class).getWindowInfo("report$inputParameters"); wm.openWindow(windowInfo, OpenType.DIALOG, ParamsMap.of("report", report)); }
@EventListener public void onColspanChanged(ColspanChangedEvent event) { DashboardLayout source = event.getSource(); ColspanDialog weightDialog = (ColspanDialog) openWindow(ColspanDialog.SCREEN_NAME, DIALOG, ParamsMap.of( ColspanDialog.WIDGET, source)); weightDialog.addCloseListener(actionId -> { if (Window.COMMIT_ACTION_ID.equals(actionId)) { events.publish(new DashboardRefreshEvent(getDashboard().getVisualModel(), source.getUuid())); } }); ((AbstractDatasource) dashboardDs).setModified(true); }
@Override public void done(Object result) { Window w = openWindow("jmxConsoleOperationResult", OpenType.DIALOG, ParamsMap.of( "result", result, "beanName", operation.getMbean().getClassName(), "methodName", operation.getName())); w.addCloseListener(actionId -> reloadAttributes()); }
@Override protected void postInit() { if (!PersistenceHelper.isNew(getItem())) { parentField.setVisible(true); PickerField.LookupAction lookupAction = new PickerField.LookupAction(parentField); lookupAction.setLookupScreenParams(ParamsMap.of("exclude", getItem())); parentField.addAction(lookupAction); } } }
protected void initValuesFormats() { CreateAction formatCreateAction = CreateAction.create(formatsTable, OpenType.DIALOG); formatCreateAction.setInitialValuesSupplier(() -> ParamsMap.of("report", getItem()) ); formatsTable.addAction(formatCreateAction); formatsTable.addAction(new RemoveAction(formatsTable, false)); formatsTable.addAction(new EditAction(formatsTable, OpenType.DIALOG)); }