【发布时间】:2015-12-24 20:33:20
【问题描述】:
我已经为一个组件定义了一个对话框:
<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" xtype="dialog">
<items jcr:primaryType="cq:Widget" xtype="tabpanel">
<items jcr:primaryType="cq:WidgetCollection">
<config jcr:primaryType="cq:Panel" title="FooTab">
<items jcr:primaryType="cq:WidgetCollection">
<foo jcr:primaryType="cq:Widget"
text="Foo"
xtype="button"
name="./fooButton"
handler="function(b, e){/*what am I editing?*/};"/>
</items>
</config>
</items>
</items>
</jcr:root>
我如何知道该对话框正在编辑哪个资源?我可以获取 name 参数中使用的“./”中隐含的显式路径吗?有没有办法从传递给按钮处理程序的参数(b = 按钮,e = 按钮单击事件)中找到它?如果没有,我怎样才能将它放入按钮处理程序中?
【问题讨论】: