-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2.12
-
None
Given a 5 UI Switchable field with DelegatingCompositeFieldTransformer, one sub-field set with i18n and one without;
this field is not converted properly to the equivalent 6 UI definition. The i18n sub-field is not set with i18n.
Original description (Blossom)
Example dialog with one field inside the switchable set to i18n:
@TabFactory("buttonLinkDialog.button.tab.label") public void buttonLinkTab(Node node, UiConfig uiConfig, TabBuilder tabBuilder) { tabBuilder.fields( uiConfig.fields.text("keepitsimple").label("Simple Field"), uiConfig.fields.text("keepitlocalized").label("Locale Field").i18n().required(), uiConfig.fields.checkbox("checkit").label("Check it").defaultValue("true").buttonLabel("Check Button"), uiConfig.fields.switchable("testme").options( new RealOptionBuilder().value("test1_text1").label("test1").selected(), new RealOptionBuilder().value("test2_text2").label("test2") ).fields( uiConfig.fields.text("test1_text1").label("Text 1").required(), // inner field set to i18n() uiConfig.fields.text("test2_text2").label("Text 2").required().i18n()) // EDIT: original report didn't include this line .transformerClass(DelegatingCompositeFieldTransformer.class) .required() ); }
An equivalent dialog in YAML is working:
form:
properties:
switchable:
$type: switchableField
label: Switchable
field:
$type: radioButtonGroupField
layout: horizontal
datasource:
$type: optionListDatasource
options:
- name: foo
value: foo
label: Foo
- name: bar
value: bar
label: Bar
itemProvider:
$type: jcrChildNodeProvider
forms:
- name: foo
properties:
foo:
label: Foo
$type: textField
bar:
label: Bar
$type: richTextField
- name: bar
properties:
foo:
label: Foo
$type: textField
bar:
label: Bar
$type: richTextField
i18n: true
Acceptance criteria