我有一个节点,其中有一个属性,其中包含需要下拉的 json 格式。
[{"text":"Type1","value":"Type1"},{"text":"Type2","value":"Type2"},{"text":"333","value":"333"}]
我在组件中有 fie options.json.jsp 以及 component.jsp
<%@include file="/libs/foundation/global.jsp"%><%
response.setContentType("text/plain");
%><%
try {
Node parent = resource.getResourceResolver().getResource("/etc/IgWebCMS/articletypes").adaptTo(Node.class);
String json=parent.getProperty("json").getString();
System.out.println("options json :::: "+json);
}
catch (RepositoryException re) {}
%>
${json}
在 Stdout.log 它显示我:
options json :::: [{"text":"Type1","value":"Type1"},{"text":"Type2","value":"Type2"},{"text":"333","value":"333"}]
在对话框下拉列表中,我提到了 options 属性:$PATH.options.json
但是在我的对话框中,没有填充值。任何想法。
谢谢