首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >多字段内多字段

多字段内多字段
EN

Stack Overflow用户
提问于 2017-02-01 14:22:18
回答 1查看 1.1K关注 0票数 0

下面是我的dialog.xml文件

代码语言:javascript
复制
 <?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>

我只是想在另一个多字段中创建多字段。我面临的问题是,一旦我用值填充了对话框字段,当我重新打开对话框时,所有字段和填充的数据都被清除,并且对话框为空。

代码语言:javascript
复制
Any suggestions what went wrong in my dialog

Thanks
EN

回答 1

Stack Overflow用户

发布于 2017-02-01 18:51:16

这是可能的,但不仅仅是使用您发布的对话框结构。您必须注意嵌套组件的字段值序列化。

您的值正在被清除,因为小部件的值映射处理与嵌套值不兼容。值得一读的是:

https://helpx.adobe.com/experience-manager/using/nested_multifield.html

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41973190

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档