Ext JS 4.1.1 broke my proxies I had set up with ASP.NET. I had to switch back to version 4.1.0 to resolve the issue. Just thought I'd throw this issue out there until it's resolved by Sencha.
JavaScript Exception:
"TypeError: Ext.resetElement is undefined" ==> "...s.styleProxyEl || (Ext.AbstractComponent.prototype.styleProxyEl" ==> ext-all-debug.js (line 26960)
getStyleProxy: function(cls) {
var result = this.styleProxyEl || (Ext.AbstractComponent.prototype.styleProxyEl = Ext.resetElement.createChild({
style: {
position: 'absolute',
top: '-10000px'
}
}, null, true));
result.className = cls;
return result;
},
Workaround:
Download version 4.1.0 of the ExtJS framework instead of using version 4.1.1.
http://cdn.sencha.io/ext-4.1.0-gpl.zip
If someone can explain what broke here exactly, I'll mark their answer as correct. Here is the proxy I'm using.
Ext.define('Ext.ux.AspWebAjaxProxy', {
extend: 'Ext.data.proxy.Ajax',
require: 'Ext.data',
buildRequest: function (operation) {
var params = Ext.applyIf(operation.params || {}, this.extraParams || {}),
request;
params = Ext.applyIf(params, this.getParams(params, operation));
if (operation.id && !params.id) {
params.id = operation.id;
}
params = Ext.JSON.encode(params);
request = Ext.create('Ext.data.Request', {
params: params,
action: operation.action,
records: operation.records,
operation: operation,
url: operation.url
});
request.url = this.buildUrl(request);
operation.request = request;
return request;
}
});
Make sure you are using
Ext.onReady(function() { ... })
. ExtJS usesExt.resetElement
which is set beforeonReady
call.Another workaround that works for me is to define this element before using ext objects: