如何在Sencha Touch中將嵌套屬性使用Ext.ComponentQuery.query?如何在嵌套屬性中使用Ext.ComponentQuery.query
e.g
var myHardtoGetObj = topLevelView.down('someview[config.categoryCfg.id=1]')[0];
這讓我 「未捕獲的錯誤」
給出:
Ext.define('SomeView', {
xtype : 'someview',
config : {
categoryCfg : {
id : 5,
name : 'someName'
}
}
});
這可能嗎?
謝謝。
非常感謝我真的很喜歡這種方法。 – 2014-09-12 12:47:30
它會是最好的地方宣佈這個僞?控制器的啓動方法,我將使用僞? – 2014-09-12 13:21:52
Ext.ComponentQuery是全局的,它的僞也是全局的。我建議將代碼放置在頂部的某個位置,以便在整個應用程序中可用。 – 2014-09-12 16:51:58