2015-06-02 25 views
0

我在AEM中有一个路径字段控件,用于错误页面处理。AEM pathfield追加值而不改变

我已经将它添加到基本页面实现中,并且当我尝试选择路径时,我看到路径附加了一个“,”。如果我清除这个字段并保存,我会发现旧的路径仍然存在。如果我添加一个新路径,我会看到新路径被附加到用逗号表示的旧路径。

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:Intially错误页面快到了不错的。
图2:在点击OK,并再次检查属性之后(注意“”正被所附)
图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的pathfield部件

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

请上传对话框配置XML或JSON,所以,这将是很容易识别的问题。在这种情况下,屏幕截图不会有太大的帮助。 – rakhi4110

+1

检查基础路径字段小部件是否已更改(或者如果您在应用程序下覆盖了该文件)。你可以在这里找到脚本(/ libs/cq/ui/widgets/source/widgets/form/PathField.js) – d33t

回答

0

由于@ d33t在回答的评论中提到,在基础之下有一个同名的路径域节点,我忽略了它。删除了节点,现在它运行良好。

感谢@ d33t