[英]Extjs4 itemselector, issue in configuration
我嘗試在extjs4.2中使用itemSelector,但我不知道我可以配置兩個存儲。 第一個多選面板由商店填充,第二個也有另一個。
我需要將差異保存在數據庫中,因為我使用的存儲是ajax-proxy數據存儲。 這是我的itemselector:
{
xtype: 'itemselector',
id:'itemselector',
name:'userRoles',
anchor:'100%',
store: dsRoles,
toStore: dsUserRoles,
valueField:'id',
displayField:'name',
/*here there is a problem*/
value: dsUserRoles,
msgTarget: 'side',
fromTitle : 'Available',
toTitle : 'Selected'
}
“選定字段”中的值來自查詢,並且不是靜態的,就像在我發現的所有示例中一樣。
編輯:toStore屬性不起作用,今天這個組件讓我發瘋:當我加載包含tabPanel的窗口時,該窗口包含第二時間的itemselector,這是呈現的內容: Chrome瀏覽器我發現此錯誤Uncaught TypeError: Cannot read property 'internalId' of undefined
任何幫助都是有幫助的。
問題已解決! 我更改了源代碼!(ItemSelector.js)在這里,
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);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.