【发布时间】:2012-01-11 15:18:24
【问题描述】:
您如何创建商店的唯一实例并将它们分配给视图(如果需要,我可以创建唯一视图和/或控制器)?
一个简单的用例 - 我想打开多个网格(相同类型),其中包含来自每个商店的记录列表。每个网格都需要有自己的商店实例,因为它可以有自己的记录列表、自己的过滤等等。
我试过这个,但它不起作用,我的网格不绘制:
var theView = Ext.create('App.view.encounter.List');
theView.title = 'WORC Encounters';
var theStore=Ext.create('App.store.Encounters');
theView.store=theStore;
tabhost.add({title:'WORC',items:theView});
var theView = Ext.create('App.view.encounter.List');
theView.title = 'NC Encounters';
var theStore2=Ext.create('App.store.Encounters');
theView.store=theStore2;
tabhost.add({title:'NC',items:theView});
【问题讨论】:
-
嗨,即使我也有类似的情况。你找到答案了吗?
-
不,不幸的是,由于这个和其他几个原因,我暂停了我的 extjs 开发并使用了不同的平台(非基于 js)。
标签: model-view-controller extjs grid instance