I spent 2 days trying to figure out this error and would like to share the resolution
Problem: I am trying to reconfigure extjs grid panel at runtime with different datastore
Code with Error:
var el = Ext.getCmp('DummyGrid');
el.reconfigure(SLADataStore, SLAColumnModel);
el.load();
Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXMLHttpRequest.open]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: http://extjs.cachefly.net/ext-3.2.1/adapter/ext/ext-base.js
code without Error:
var el = Ext.getCmp('DummyGrid');
el.reconfigure(SLADataStore, SLAColum开发者_开发百科nModel);
SLADataStore.load({
params: { start: 0,
limit: 25,
sort: 'LevelID',
dir: 'ASC'}
});
Reason for the error: when I try to load it should have been datastore.load() not the component.load()
Hope this post might help 2 days of their time which might be well spent on beers ;)
-Sat
Try
el.getStore().load();
精彩评论