-
Bug
-
Resolution: Fixed
-
Neutral
-
None
-
None
-
None
-
-
Empty show more show less
-
UI Framework & 6.2 Ramp up 15
-
3
info.magnolia.ui.field.factory.FieldBinder.Default uses method com.vaadin.data.Binder.BindingBuilder#withNullRepresentation to propagate default value from field definition. This cause that field can't be set to empty because then it's every time converted to default value
On the other hand info.magnolia.ui.field.TextFieldBinder set com.vaadin.data.Binder.BindingBuilder#withNullRepresentation to empty string which cause that default values is never used
Reproduce:
Issue 1
select:
label: select
$type: comboBoxField
emptySelectionAllowed: true
defaultValue: Bartok
datasource:
$type: optionListDatasource
options:
- name: Vivaldi
value: Vivaldi
- name: Bach
value: Bach
- name: Bartok
value: Bartok
This definition allows empty selection in combobox, but after selecting the empty option and reopening dialog "Bartok" (defaultValue) is selected instead of the empty one
Issue 2
salutation: label: salutation $type: textField defaultValue: Mr description: hello
In this definition defaultValue is completely ignored, because TextFieldBinder instead sets empty string
- is related to
-
MGNLUI-5478 Issue with null representation in TextFieldBinder when type is set to something else than String
- Closed
- relates to
-
MGNLUI-5325 Support defaultValue in fields of new ui framework
- Closed