AEM provides OOTB multi-field in which only one widget/field can be configured as part of the multi-field.
For example, have a look at the OOTB list component
(/libs/foundation/components/list/cq:dialog/content/items/column/items/
setStatic/items/well/items/pages) which only has a single field in a multifield.
In most cases this might not suffice your requirement. You might need a composite multi-field with 2 or more fields as part of the multi-field.
To achieve this there are multiple options. You can choose to go with either of them.
1. Touch UI Composite Multifield Store Values as Child Nodes
http://experience-aem.blogspot.in/2015/06/aem-61-touch-ui-composite-multifield-store-values-as-child-nodes.html
2. Touch UI composite multifield Store Values in Json format.
http://experience-aem.blogspot.in/2015/02/aem-6-sp2-touch-ui-multi-field-component.html
3. Use ACS-Commons which provides both nodestore and jsonstore options.
a. Store Values as Child Nodes
/apps/acs-commons/touchui-widgets/composite- multifield/source/touchui-composite-multifield-nodestore.js
Note the usage of acs-commons-nested property, value set to NODE_STORE
b. Store Values in Json format.
/apps/acs-commons/touchui-widgets/composite-multifield/source/touchui-composite-multifield.js
Note the usage of acs-commons-nested property, value set to JSON_STORE
Leave a Reply