Multifield component not storing values.
Hi, I've created a multifield component that uses jsonDeserializer but the values get automatically deleted after I author it.
cq dialog:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:granite="http://www.adobe.com/jcr/granite/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="nt:unstructured"
jcr:title="Panel 16 - HDFC Now"
sling:resourceType="cq/gui/components/authoring/dialog">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs">
<items jcr:primaryType="nt:unstructured">
<Panel_x0020_16
jcr:primaryType="nt:unstructured"
jcr:title="Panel 16"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<side-image-desktop
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldLabel="Side Image Desktop"
name="./image"/>
<side-image-mobile
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldLabel="Side Image Mobile"
name="./mimage"/>
</items>
</Panel_x0020_16>
<left-column
jcr:primaryType="nt:unstructured"
jcr:title="Left Column"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights-list
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldLabel="Highlight">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./highlightsLeft">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fieldSetName
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/accordion"
multiple="{Boolean}true"
variant="default">
<items jcr:primaryType="nt:unstructured">
<fieldSet
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fieldSet
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue1="ctaVariation"/>
<items jcr:primaryType="nt:unstructured">
<image
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldDescription="Image of the highlight"
fieldLabel="Image"
name="image"/>
<count
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Count of the highlight"
fieldLabel="Count"
name="count"/>
<detail
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="The maximum length for this field is 150"
fieldLabel="Detail"
maxlength="150"
name="detail"/>
</items>
</highlights>
</items>
</fieldSet>
</items>
<parentConfig
jcr:primaryType="nt:unstructured"
active="{Boolean}true"/>
</fieldSet>
</items>
</fieldSetName>
</items>
</column>
</items>
</field>
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-multifield-label="Add More"/>
</highlights>
</items>
</highlights-list>
</items>
</left-column>
<right-column
jcr:primaryType="nt:unstructured"
jcr:title="Right Column"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights-list
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/multifield"
fieldLabel="Highlight">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container"
name="./highlightsRight">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fieldSetName
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/accordion"
multiple="{Boolean}true"
variant="default">
<items jcr:primaryType="nt:unstructured">
<fieldSet
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<fieldSet
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<highlights
jcr:primaryType="nt:unstructured"
jcr:title="Highlights"
sling:resourceType="granite/ui/components/coral/foundation/container">
<granite:data
jcr:primaryType="nt:unstructured"
showhidetargetvalue1="ctaVariation"/>
<items jcr:primaryType="nt:unstructured">
<image
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
fieldDescription="Image of the highlight"
fieldLabel="Image"
name="image"/>
<count
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="Count of the highlight"
fieldLabel="Count"
name="count"/>
<detail
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/textfield"
fieldDescription="The maximum length for this field is 150"
fieldLabel="Detail"
maxlength="150"
name="detail"/>
</items>
</highlights>
</items>
</fieldSet>
</items>
<parentConfig
jcr:primaryType="nt:unstructured"
active="{Boolean}true"/>
</fieldSet>
</items>
</fieldSetName>
</items>
</column>
</items>
</field>
<granite:data
jcr:primaryType="nt:unstructured"
cq-dialog-multifield-label="Add More"/>
</highlights>
</items>
</highlights-list>
</items>
</right-column>
</items>
</content>
</jcr:root>
Component HTML:
<sly data-sly-use.leftHighlightsObj="${'/apps/HDFCNow/utility/site/jsonDeserializer.js' @ fieldName = 'highlightsLeft',fieldValue = ''}"></sly>
<sly data-sly-use.rightHighlightsObj="${'/apps/HDFCNow/utility/site/jsonDeserializer.js' @ fieldName = 'highlightsRight',fieldValue = ''}"></sly>
<section id="panel16" class="slide-section">
<picture>
<source media="(max-width:767px)" srcset="/content/dam/HDFCNow/home/images/home_16_bg_mob.jpg"><img src="/content/dam/HDFCNow/home/images/home_16_bg.jpg" alt="hdfc-now" title="HDFC NOW" class="social-bg">
</picture>
<div class="il-container sec-wrap">
<div class="cont-column-inner">
<div class="left-column marquee">
<div class="left-inner-column">
<sly data-sly-list.leftItemObj=${leftHighlightsObj.listJson}>
<div class="cardwrap">
<div class="numberwrap"> <img data-sly-test="${leftItemObj.image}" src="${leftItemObj.image}" alt="hdfc-now" title="HDFC NOW"> <span data-sly-test="${leftItemObj.count}" class="counter">${leftItemObj.count}</span></div>
<div class="contwrap">
<p class="cont">${leftItemObj.detail}</p>
</div>
</div>
</sly>
</div>
<div class="right-inner-column">
<sly data-sly-list.rightItemObj=${rightHighlightsObj.listJson}>
<div class="cardwrap">
<div class="numberwrap"> <img data-sly-test="${rightItemObj.image}" src="${rightItemObj.image}" alt="hdfc-now" title="HDFC NOW"> <span data-sly-test="${rightItemObj.count}" class="counter">${rightItemObj.count}</span></div>
<div class="contwrap">
<p class="cont">${rightItemObj.detail}</p>
</div>
</div>
</sly>
</div>
</div>
</div>
<div class="img-wrap">
<picture>
<source media="(max-width:767px)" srcset="${properties.mimage}"><img src="${properties.image}" alt="hdfc-now" title="HDFC NOW">
</picture>
</div>
</div>
</section>
Any help is appreciated.