AEM 6.4: мультиполе cq:dialog сохраняет атрибут с @Delete

Я настраиваю свой диалог cq: для использования мультиполя, которое содержит либо форму выбора, либо поле флажка в моем компоненте. Однако, когда я задаю значение при настройке компонента, поле сохраняется с добавленным к нему дополнительным символом "@Delete", и я не могу получить доступ / прочитать это поле на своей странице. Вот мой context.xml для диалога cq:

<?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>

и когда я смотрю на CRX для свойств настроенного компонента, я получаю следующее:

  • Название: особенности
  • Тип: Строка
  • Значение: {"optionA@Delete":"valueA"}

В моем компоненте jsp (да, я знаю, что не использую Sightly), я получаю доступ к конфигурации следующим образом:

<c:set var="items" value="${widgets:getMultiFieldPanelValues(resource, 'features')}"/>
<c:forEach items="${features}" var="feature">
  ${feature.optionA}
</c:forEach>

но он никогда не найдет этот вариант. Что мне здесь не хватает? Заранее спасибо!

0 ответов

Другие вопросы по тегам