Reputation: 1
Below is my dialog.xml file
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:Dialog"
title="CQ Dialog"
xtype="dialog">
<items
jcr:primaryType="cq:Widget"
xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<tab1
jcr:primaryType="cq:Panel"
title="Tab 1">
<items jcr:primaryType="cq:WidgetCollection">
<addcolumn
jcr:primaryType="cq:Widget"
fieldDescription="Click + to add column"
fieldLabel="Add column"
name="./addcolumn"
xtype="multicompositefield">
<fieldConfigs jcr:primaryType="cq:WidgetCollection">
<countrydetails
jcr:primaryType="cq:Widget"
fieldDescription="Click + to add country details"
fieldLabel="Add country details"
name="./countrydetails"
xtype="multifield">
<fieldConfig
jcr:primaryType="cq:Widget"
hideLabel="false"
xtype="multifieldpanel">
<items jcr:primaryType="cq:WidgetCollection">
<countryname
jcr:primaryType="cq:Widget"
fieldLabel="Country name"
name="./countryname"
width="200"
xtype="textfield"/>
<countryicon
jcr:primaryType="cq:Widget"
fieldLabel="Country icon"
name="./countryicon"
width="200"
xtype="pathfield"/>
<linkurl
jcr:primaryType="cq:Widget"
fieldLabel="Link url"
name="./linkurl"
width="200"
xtype="pathfield"/>
</items>
</fieldConfig>
</countrydetails>
</fieldConfigs>
</addcolumn>
</items>
</tab1>
</items>
</items>
</jcr:root>
I was just trying to create multifield inside another multifield. Issue I am facing is, once I filled the dialog field with values and when I reopen the dialog, all fields and filled data is cleared and dialog is empty.
Any suggestions what went wrong in my dialog
Thanks
Upvotes: 0
Views: 1308
Reputation: 3444
This is possible but not just with the dialog structure you posted. You have to take care of field value serialisation for nested components.
Your values are blanking out because the value map handling of widgets is not compatible with nested values. A good read is at:
https://helpx.adobe.com/experience-manager/using/nested_multifield.html
Upvotes: 1