在我的组件对话框中,我使用browsefield
XType 使用户能够浏览页面树并选择页面:
<page jcr:primaryType="cq:Widget"
fieldLabel="Page"
name="./path"
xtype="browsefield" />
同时,我想让一些页面不可见。假设我有以下结构:
pages/
page1/
page1_1/
page1_2/
我该如何制作pages/page1/page1_2
不可见,这样当他浏览页面树时没有人可以选择它?
浏览字段是一个已弃用的 xtype,它的替代品是帕斯菲尔德 http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.PathField有这个功能。 Pathfield 有一个属性叫做谓词可用于过滤。您可以创建并注册一个自定义谓词,该谓词对于您不希望在对话框中可见的路径返回 false。然后可以将自定义谓词的名称传递给路径字段的配置。
您可以在这里找到有关此内容的详细教程:http://www.albertoalmagro.com/2013/05/adobe-cq5-create-predicate-pathfield.html http://www.albertoalmagro.com/2013/05/adobe-cq5-create-predicate-pathfield.html
有关谓词的更多信息,可以参考以下链接:
http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html http://www.wemblog.com/2013/04/how-to-create-custom-query-predicate-in.html
http://labs.sixdimensions.com/blog/2013-07-10/custom-predicateevaluators-or-how-i-learned-stop-worrying-and-love/ http://labs.sixdimensions.com/blog/2013-07-10/custom-predicateevaluators-or-how-i-learned-stop-worrying-and-love/
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)