protected void selectScreenId() { if (isNotBlank(screenId)) { screenIdLookup.setValue(screenId); } }
protected void selectLookupId() { if (isNotBlank(lookupWindowId)) { lookupIdLookup.setValue(lookupWindowId); } }
protected void refreshLoggers(JmxRemoteLoggingAPI.LoggingHostInfo hostInfo) { List<String> loggers = new ArrayList<>(hostInfo.getLoggerNames()); Collections.sort(loggers); loggers.add(0, getMessage("logger.new")); loggerNameField.setOptionsList(loggers); loggerNameField.setValue(null); loggerLevelField.setValue(null); }
protected void selectIfExist(EnumParameterValue enumValue) { if (enumValue == null || isBlank(enumValue.getValue())) { return; } String className = enumValue.getValue(); ((List<Class>) enumClassLookup.getOptionsList()) .stream() .filter(clazz -> className.equals(clazz.getName())) .findFirst() .ifPresent(enumClass -> enumClassLookup.setValue(enumClass)); }
protected void refreshLogFileNames(JmxRemoteLoggingAPI.LoggingHostInfo hostInfo) { // try to keep previously selected file name String selectedFileName = logFileNameField.getValue(); List<String> logFiles = hostInfo.getLogFileNames(); logFileNameField.setValue(null); logFileNameField.setOptionsList(logFiles); autoRefreshCheck.setValue(false); if (selectedFileName != null && logFiles.contains(selectedFileName)) { logFileNameField.setValue(selectedFileName); } logTailLabel.setValue(""); }
@Override protected void postInit() { String value = formatField.getValue(); if (value != null) { if (!formatField.getOptionsMap().containsValue(value)) { addFormatItem(value); } formatField.setValue(value); } }
protected void fillSelectEntityScreens(Class entityClass) { Map<String, String> screensMap = screensHelper.getAvailableBrowserScreens(entityClass); screenField.setOptionsMap(screensMap); String value = attribute.getScreen(); screenField.setValue(screensMap.containsValue(value) ? value : null); }
protected void updateOutputType() { if (outputType.getValue() == null) { String extension = FilenameUtils.getExtension(templateUploadField.getFileDescriptor().getName()).toUpperCase(); ReportOutputType reportOutputType = ReportOutputType.getTypeFromExtension(extension); if (reportOutputType != null) { outputType.setValue(reportOutputType); } } }
public void clearFilter() { nameFilter.setValue(null); codeFilter.setValue(null); updatedDateFilter.setValue(null); groupFilter.setValue(null); } }
@Override public void actionPerform(Component component) { wizard.getItem().getReportRegions().clear(); wizard.regionsTable.refresh(); //for web6 wizard.needUpdateEntityModel = true; wizard.entity.setValue((MetaClass) newValue); clearQueryAndFilter(); } }));
protected void setChartDescription(@Nullable AbstractChartDescription chartDescription) { if (chartDescription != null) { if (ChartType.SERIAL == chartDescription.getType()) { serialChartDs.setItem((SerialChartDescription) chartDescription); } else if (ChartType.PIE == chartDescription.getType()) { pieChartDs.setItem((PieChartDescription) chartDescription); } type.setValue(chartDescription.getType()); } }
protected void initProcRolesLookup() { procRolesLookup.addValueChangeListener(e -> { if (e.getValue() == null) { return; } addProcActor((ProcRole) e.getValue()); procRolesLookup.setValue(null); }); }
public void initTemplateAndOutputSelect() { if (report != null) { if (report.getTemplates() != null && report.getTemplates().size() > 1) { templateField.setValue(report.getDefaultTemplate()); setTemplateVisible(true); } templateField.addValueChangeListener(e -> updateOutputTypes()); updateOutputTypes(); } }
@Override public Field createField(ProcFormParam formParam, String actExecutionId) { LookupField lookupField = componentsFactory.createComponent(LookupField.class); Map<String, Object> localizedOptionsMap = getLocalizedOptionsMap(formParam); lookupField.setOptionsMap(localizedOptionsMap); lookupField.setValue(formParam.getValue()); standardFieldInit(lookupField, formParam); return lookupField; }
protected void initLocalesField() { Map<String, Locale> locales = globalConfig.getAvailableLocales(); localesSelect.setOptionsMap(locales); localesSelect.addValueChangeListener(createLocaleSelectValueChangeListener()); localesSelect.setValue(userSessionSource.getLocale()); }
private Component createLookupField(List<String> values, String currentValue) { LookupField<String> lookupField = uiComponents.create(LookupField.NAME); lookupField.setOptionsList(values); lookupField.setValue(currentValue); lookupField.addValueChangeListener(e -> { appPropertyDs.getItem().setCurrentValue(e.getValue()); }); return lookupField; }
protected void fillOperationSelect(CategoryAttribute categoryAttribute) { Class clazz = DynamicAttributesUtils.getAttributeClass(categoryAttribute); OpManager opManager = AppBeans.get(OpManager.class); EnumSet<Op> availableOps = BooleanUtils.isTrue(categoryAttribute.getIsCollection()) ? opManager.availableOpsForCollectionDynamicAttribute() : opManager.availableOps(clazz); List<Op> ops = new LinkedList<>(availableOps); operationLookup.setOptionsList(ops); Op operator = condition.getOperator(); if (operator != null) { operationLookup.setValue(operator); } } }