dialog.path的null值

时间:2014-10-24 13:56:00

标签: cq5 aem

我的对话框中有面板,&面板上的后悔听众。我无法在此侦听器中获取dialog.path。以下是我的代码。

function()
{
    var count;
    var select2opts = [];   
    var dialog = this.findParentByType('dialog');
    var dropdown = this.getComponent("dropdown1");
    console.log(dialog.path);
    console.log(dialog);
    console.log(dropdown);
}

我能够获得对话框对象,在其中我可以看到我需要的属性路径。但在控制台dialog.path上打印null。任何想法。

 <items
        jcr:primaryType="cq:Widget"
        xtype="tabpanel">
        <items jcr:primaryType="cq:WidgetCollection">
            <tabcontrolpanel
               //props
                <items jcr:primaryType="cq:WidgetCollection">
                    <items jcr:primaryType="cq:WidgetCollection">
                        <typeconfigs
                          //props
                            <fieldConfigs jcr:primaryType="cq:WidgetCollection">
                                <option
                                  //props
                                <optionval
                                  //prop
                            </fieldConfigs>
                        </typeconfigs>
                        <displayoptions
                            //props
                            <options jcr:primaryType="cq:WidgetCollection">
                                <one
                                    jcr:primaryType="nt:unstructured"
                                    text="Click to refresh tabs list."
                                    value="on"/>
                            </options>

                        </displayoptions>
                        <opentab
                           //props
                            <options jcr:primaryType="cq:WidgetCollection">
                                <one
                                    //props
                            </options>

                        </opentab>
                    </items>
                </items>
                <listeners
                    jcr:primaryType="nt:unstructured"
                    afterrender="Here Code Applies that i sent"/>
            </tabcontrolpanel>
        </items>
    </items>

1 个答案:

答案 0 :(得分:1)

试试这个

dialog.responseScope.path