AEM 路径字段附加值而不更改
AEM pathfield appending values without changing
我在 AEM 中有一个用于错误页面处理的路径字段小部件。
我在基本页面实现中添加了它,当我尝试 select 路径时,我看到路径后附加了一个“,”。如果我清除该字段并保存,我会看到旧路径仍然存在。如果我添加一条新路径,我会看到新路径附加到以逗号分隔的旧路径。
图 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 - 为错误页面定义路径字段小部件
<?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>
正如@d33t 在对答案的评论中提到的,foundation 下有一个同名的 pathfield 节点,我忽略了它。删除了节点,它现在运行良好。
谢谢@d33t
我在 AEM 中有一个用于错误页面处理的路径字段小部件。
我在基本页面实现中添加了它,当我尝试 select 路径时,我看到路径后附加了一个“,”。如果我清除该字段并保存,我会看到旧路径仍然存在。如果我添加一条新路径,我会看到新路径附加到以逗号分隔的旧路径。
图 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 - 为错误页面定义路径字段小部件
<?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>
正如@d33t 在对答案的评论中提到的,foundation 下有一个同名的 pathfield 节点,我忽略了它。删除了节点,它现在运行良好。
谢谢@d33t