public void clearFields() { for (TextField textField : textFieldMap.values()) { textField.setValue(""); } }
@Override public void actionPerform(com.haulmont.cuba.gui.components.Component component) { textField.setValue(null); fireValueChangeListeners(null); } });
@Override public void actionPerform(Component component) { componentTextField.setValue(componentTextField.getRawValue() + selectedComponentId); } }
public void setValue(String localeBundle) { if (localeBundle == null || textFieldMap == null) { return; } Map<String, String> localizedNamesMap = LocaleHelper.getLocalizedValuesMap(localeBundle); for (Map.Entry<Locale, TextField> textFieldEntry : textFieldMap.entrySet()) { String keyLocale = textFieldEntry.getKey().toString(); textFieldEntry.getValue().setValue(localizedNamesMap.get(keyLocale)); } }
private void checkFieldInput(String text, TextField field, LookupField unitsField) { Matcher matcher = DIMENSION_PATTERN.matcher(text); if (matcher.matches()) { String value = matcher.group(1); SizeUnit sizeUnit = SizeUnit.fromId(matcher.group(2)); field.setValue(value); unitsField.setValue(sizeUnit); } }
@Override public void setCondition(FtsCondition condition) { super.setCondition(condition); caption.setValue(condition.getCaption()); }
protected void setInteger(IntegerParameterValue value) { textField.setValue(value == null ? null : value.getValue()); initTextField("int"); }
protected void setLong(LongParameterValue value) { textField.setValue(value == null ? null : value.getValue()); initTextField("long"); }
@Override public void accept(HasValue.ValueChangeEvent e) { setGeneratedReportName((MetaClass) e.getPrevValue(), (MetaClass) e.getValue()); wizard.outputFileName.setValue(""); }
@Override public Field createField(ProcFormParam formParam, String actExecutionId) { TextField textField = componentsFactory.createComponent(TextField.class); standardFieldInit(textField, formParam); textField.setValue(formParam.getValue()); return textField; } }
protected void initEntityNameField() { String entityName = getItem().getEntityName(); MetaClass metaClass = metadata.getClass(entityName); if (metaClass != null) { MessageTools messageTools = messages.getTools(); this.entityName.setValue(messageTools.getEntityCaption(metaClass) + " (" + metaClass.getName() + ")"); } else { this.entityName.setValue(entityName); } }
public void addEnumValue() { Object value = valueField.getValue(); if (value != null) { if (!valueExists(value)) { valueField.setValue(null); addValueToDatasource(value, null); valuesMap.put(value, ListEditorHelper.getValueCaption(value, ListEditor.ItemType.STRING, null)); } } }
@Override public void setCondition(DynamicAttributesCondition condition) { super.setCondition(condition); fillCategorySelect(); caption.setValue(condition.getCaption()); }
@Override public void beforeShowFrame() { initSaveAction(); initDownloadAction(); if (StringUtils.isEmpty(wizard.outputFileName.getValue())) { Object value = wizard.templateFileFormat.getValue(); wizard.outputFileName.setValue(wizard.generateOutputFileName(value.toString().toLowerCase())); } wizard.setCorrectReportOutputType(); initChartPreview(); }
public void clearEntityLogTable() { userField.setValue(null); filterEntityNameField.setValue(null); changeTypeField.setValue(null); instancePicker.setValue(null); fromDateField.setValue(null); tillDateField.setValue(null); showRowField.setValue(String.valueOf(DEFAULT_SHOW_ROWS)); }
@Override public void postInit() { typesInfo = widgetRepository.getWidgetTypesInfo(); setWidgetType(); initParametersFrame(); widgetCaption.addValueChangeListener(v -> { if (StringUtils.isEmpty(widgetId.getValue())) { widgetId.setValue(v.getValue()); } }); ((AbstractDatasource) widgetDs).setModified(false); }
public void addLogger() { if (StringUtils.isNotBlank(loggerNameField.getValue())) { if (logLevelField.getValue() != null) { this.selectedLoggerName = loggerNameField.getValue(); this.selectedLevel = logLevelField.getValue(); close(COMMIT_ACTION_ID); } else showNotification(getMessage("logger.notSelectedLevel"), NotificationType.HUMANIZED); } else { loggerNameField.setValue(null); showNotification(getMessage("logger.notSelected"), NotificationType.HUMANIZED); } }
protected Consumer<HasValue.ValueChangeEvent<Locale>> createLocaleSelectValueChangeListener() { return e -> { captionValueChangeListener.suspend(); messageValueChangeListener.suspend(); Locale selectedLocale = (Locale) e.getValue(); String localeCode = messages.getTools().localeToString(selectedLocale); caption.setValue(getItem().getLocalizedCaption(localeCode)); message.setValue(getItem().getLocalizedMessage(localeCode)); captionValueChangeListener.resume(); messageValueChangeListener.resume(); }; }