If you use currentItemProvider with composite or switchable fields, make sure that none of the inner field names clash with: - Other inner field names at the level where
currentItemProvider is used - Other field names one level up where the composite or switchable field is defined
That is, every field at every level must have a unique name. Otherwise, nodes sharing the same name could be resolved by multiple fields that use currentItemProvider , which means their content would be overwritten. Code Block |
---|
language | yml |
---|
title | Example name conflict |
---|
collapse | true |
---|
| form:
properties:
first_compositeField:
$type: compositeField
itemProvider:
$type: currentItemProvider
properties:
inner_simple: # duplicate name
$type: textField # first text
inner_simple2:
$type: textField # second text
second_compositeField:
$type: compositeField
itemProvider:
$type: currentItemProvider
properties:
inner_simple3:
$type: textField # third text
inner_simple: # duplicate name
$type: textField # fourth text
# Problem with using currentItemProvider
currentItemedited_node:
inner_simple: fourth text # first text is overwritten by second inner_simple
inner_simple2: second text
inner_simple3: third text
# Using jcrChildNodeProvider with both composite fields would fix the problem
currentItemedited_node:
first_compositeField:
properties:
inner_simple: first text
inner_simple2: second text
second_compositeField:
properties:
inner_simple3: third text
inner_simple: fourth text # no name conflict |
|