AEM 6.4: cq:dialog multifield saves attribute with @Delete
I'm setting up my cq:dialog to use multifield, which contains either a form select or checkbox field in my component.
However, when I set the value when configuring the component, the field is stored with an additional "@Delete" appended to it and I can't access/read this field in my page. Here's my context.xml for the cq dialog:
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/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="Test Component"
sling:resourceType="cq/gui/components/authoring/dialog"
width="960">
<content
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/tabs"
type="nav"/>
<items jcr:primaryType="nt:unstructured">
<tab1
jcr:primaryType="nt:unstructured"
jcr:title="Main Options"
sling:resourceType="granite/ui/components/foundation/section">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<features
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/multifield"
fieldLabel="Config Items"
required="{Boolean}false">
<field
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/fieldset"
acs-commons-nested=""
name="./features">
<layout
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/layouts/fixedcolumns"
method="absolute"/>
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/container">
<items jcr:primaryType="nt:unstructured">
<optionA
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/select"
name="./optionA"
fieldLabel="Option A"
>
<items jcr:primaryType="nt:unstructured">
<valueA
jcr:primaryType="nt:unstructured"
text="Value A"
value="valueA"/>
<valueB
jcr:primaryType="nt:unstructured"
text="Value B"
value="valueB"/>
</items>
</optionA>
</items>
</column>
</items>
</field>
</features>
</items>
</column>
</items>
</tab1>
</items>
</content>
</jcr:root>
and when I look at CRX for the properties of the configured component, I get the following:
- Name: features
- Type: String
- Value: {"optionA@Delete":"valueA"}
In my component jsp (yes, I know I'm not using Sightly), I access the configuration as follows:
<c:set var="items" value="${widgets:getMultiFieldPanelValues(resource, 'features')}"/>
<c:forEach items="${features}" var="feature">
${feature.optionA}
</c:forEach>
but it never finds that optionA. What am I missing here?
Thanks in advance!