0
我在AEM中有一個路徑字段控件,用於錯誤頁面處理。AEM pathfield追加值而不改變
我已經將它添加到基本頁面實現中,並且當我嘗試選擇路徑時,我看到路徑附加了一個「,」。如果我清除這個字段並保存,我會發現舊的路徑仍然存在。如果我添加一個新路徑,我會看到新路徑被附加到用逗號表示的舊路徑。
圖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>
請上傳對話框配置XML或JSON,所以,這將是很容易識別的問題。在這種情況下,屏幕截圖不會有太大的幫助。 – rakhi4110
檢查基礎路徑字段小部件是否已更改(或者如果您在應用程序下覆蓋了該文件)。你可以在這裏找到腳本(/ libs/cq/ui/widgets/source/widgets/form/PathField.js) – d33t