-
16 Apr 2012 6:29 AM #1
Ext.ux.form.ItemSelector does not work with asynchronous loading (proxy)
Ext.ux.form.ItemSelector does not work with asynchronous loading (proxy)
Hi,
i am using the Ext.ux.form.ItemSelector field in one of my client's apps. The ItemSelector example demonstrates how to use the component with an inline store and static data. When the component is supplied with a Asynchronous store, the loaded data is not displayed. This can be fixed by re-binding the store to the component on load of the store (see 'load' listener on the store):
Code:Ext.define('ux.form.LovSelector', { extend: 'Ext.ux.form.ItemSelector', initComponent: function() { var me = this; var ds = Ext.create('Ext.data.Store', { model: 'AFS.model.Ability', proxy: { type: 'direct', paramsAsHash: true, directFn: AFS.Direct.Data.combolist, reader: { root: 'data', totalProperty: 'total', id: 'id', type: 'json' } }, /* hack to make sure that an async load is handled */ listeners: { load: function() {me.bindStore(me.store);} }, autoLoad: true }); Ext.apply(this,{ store: ds, displayField: 'name', valueField: 'id' }); this.callParent(); } });
-
20 Apr 2012 8:26 AM #2
Thank you for the report.
Regards,
Scott.
Success! Looks like we've fixed this one. According to our records the fix was applied for
EXTJSIV-5948
in
4.1.


Reply With Quote