AEM路径附加值而不更改

时间:2015-06-02 18:48:06

标签: adobe cq5 aem

我在AEM中有一个路径字段小部件,用于处理错误页面。

我已经在基页实现中添加了它,当我尝试选择路径时,我发现有一个","附加到路径。如果我清除该字段并保存,我会看到旧路径仍然存在。如果我添加一个新路径,我会看到新路径被附加到用逗号分隔的旧路径。

Intially the error pages is coming up good After clicking OK and checking the properties again (Note the "," that is being appended) After adding a new path (Again the path is appended after the ",")

图1:最初错误页面很好。
图2:单击确定并再次检查属性后(注意","正在追加)
图3:添加新路径后(同样路径附加在",")

有没有人遇到同样的问题。我试过不同的论坛,但无法得到任何答案。相同的配置在我的本地工作正常但是当我将相同的代码推送到服务器时它会产生问题。

更新 -

dialog.xml - 这里我定义了显示错误页面路径字段的选项卡

<?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"
height="400"
stateful="false"
xtype="dialog">
<items jcr:primaryType="cq:WidgetCollection">
    <tabs jcr:primaryType="cq:TabPanel">
        <items jcr:primaryType="cq:WidgetCollection">
            <livecopy
                jcr:primaryType="cq:Widget"
                path="/libs/foundation/components/page/tab_livecopy.infinity.json"
                xtype="cqinclude"/>
            <mytab
                jcr:primaryType="cq:Widget"
                path="/apps/webex/eopi/components/pages/home-page/tab_something.infinity.json"
                xtype="cqinclude"/>
        </items>
    </tabs>
</items>
</jcr:root>

tab_something.xml - 为errorpages定义路径域小部件

<?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:Panel"
title="Webex">
<items jcr:primaryType="cq:WidgetCollection">
    <basic
        jcr:primaryType="cq:Widget"
        collapsed="{Boolean}false"
        collapsible="{Boolean}false"
        xtype="dialogfieldset">
        <items jcr:primaryType="cq:WidgetCollection">
            <errorpages
                jcr:primaryType="cq:Widget"
                fieldDescription="Error pages for this content tree"
                fieldLabel="Error Pages"
                name="./errorPages"
                xtype="pathfield"/>
        </items>
    </basic>
</items>
</jcr:root>

1 个答案:

答案 0 :(得分:0)

正如@ d33t在答案的评论中提到的那样,在基础上有一个同名的路径域节点,我忽略了它。删除了节点,它现在运行良好。

谢谢@ d33t