I’m trying to figure out why callParent isn’t working.
Here’s some code:
Ext.define('AM.ArView', {
extend:'Ext.window.Window',
initComponent: function() {
var foo = this;
console.log(foo);
Ext.Ajax.request({
url: 'http://my/awesome/path',
success: function(response, opts) {
console.log(foo);
foo.callParent();
},
failure: function(response, opts) {
console.log('error');
}
});
}
});
Error:
Uncaught TypeError: Cannot read property ‘superclass’ of undefined
I need to load the windows items via ajax
Hei Julian!
I needed to do a similar operation, and i ended up wrappign the ajax request in a function which i pass a callback function into it to execute when the request is done, and from the call back i launch the windows.
In terms of code, it would be something like:
then you call int lets, say ona button click:
HTH!