initComponent: function() {
var me = this;
me.ddGroup = me.id + '-dd';
me.callParent();
// bindStore must be called after the fromField has been created because
// it copies records from our configured Store into the fromField's Store
//me.bindStore(me.store); //don't need to bind
},
createList: function(title, store){ //add a parameter named store
...
store: store, //use the passed store
...
}
...
me.fromField = me.createList(me.fromTitle, me.store);
me.toField = me.createList(me.toTitle, me.toStore);
以上是ItemSelector.js修改后的样子,
有空再整理我的实例发上来
参考文章,帮了我大忙!
http://stackoverflow.com/questions/16567272/extjs4-itemselector-issue-in-configuration