Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sencha touch 如何知道嵌套列表中叶项目的父项?_Sencha Touch_Extjs_Sencha Touch 2 - Fatal编程技术网

Sencha touch 如何知道嵌套列表中叶项目的父项?

Sencha touch 如何知道嵌套列表中叶项目的父项?,sencha-touch,extjs,sencha-touch-2,Sencha Touch,Extjs,Sencha Touch 2,是否有一种方法可以让您知道该项的父项? 这就像我有一个这样结构的商店: root: { items: [ { text: 'Parent1', items: [ { text: 'Child1', leaf: true }, { text: 'Child2', leaf: true },

是否有一种方法可以让您知道该项的父项? 这就像我有一个这样结构的商店:

root: {
        items: [
            {
                text: 'Parent1',
                items: [
                    { text: 'Child1', leaf: true },
                    { text: 'Child2', leaf: true },
                    ............

当我点击叶子项目时,我需要知道哪个父项有这个叶子项目。我找不到关于此特殊方法的任何信息。

在itemtap&leaftitemtap中,记录被传递给侦听器

从这里,您可以使用以下方法获取父记录:

record.parentNode

在itemtap&leaftitemtap中,记录被传递给侦听器

从这里,您可以使用以下方法获取父记录:

record.parentNode