【发布时间】:2014-12-30 00:56:44
【问题描述】:
我已经为此绞尽脑汁好几个小时了。我正在尝试在选择 xtype 中动态填充选项,但无法使其正常工作。这是我的 dialog.xml
<resourceType
jcr:primaryType="cq:Panel"
title="Header Type">
<items jcr:primaryType="cq:WidgetCollection">
<headerType
jcr:primaryType="cq:Widget"
fieldLabel="Header Type"
name="./headerType"
type="select"
xtype="selection">
<options jcr:primaryType="cq:WidgetCollection">
<categories
jcr:primaryType="cq:Widget"
path="/content/admin/adminView/jcr:content/header-admin-content/cats/type.infinity.json"
width="500"
xtype="cqinclude" />
</options>
</headerType>
</items>
</resourceType>
我正在生成的 json:
content/admin/adminView/jcr:content/header-admin-content/cats/type.infinity.json
看起来像这样:
{"jcr:primaryType":"nt:unstructured","item_1":
{"jcr:primaryType":"nt:unstructured","text":"small","parameter":"small"},"item_2":
{"jcr:primaryType":"nt:unstructured","text":"medium","parameter":"medium"},"item_3":
{"jcr:primaryType":"nt:unstructured","text":"large","parameter":"large"},"item_4":
{"jcr:primaryType":"nt:unstructured","text":"none","parameter":"none"}}
当我打开对话框时没有任何反应,我只是收到一个 JS 错误 TypeError: sn-p.xtype is undefined
感谢任何帮助!
【问题讨论】: