Brett89
12 Apr 2012, 10:20 PM
So I define a custom proxy like so:
Ext.define('CustomProxy', {
alias: 'proxy.custom',
extend: 'Ext.data.proxy.Ajax',
reader: {
type: 'json',
root: 'defaultRoot'
}
});
And I instantiate two stores using that proxy:
var myStore = Ext.create('Ext.data.Store', {
storeId: 'myStore',
model: 'myModel',
proxy: {
type: 'custom',
url: 'myUrl.asmx'
}
});
var myOtherStore = Ext.create('Ext.data.Store', {
storeId: 'myOtherStore',
model: 'myOtherModel',
proxy: {
type: 'custom',
url: 'myOtherUrl.asmx'
}
});
So all I've done with the proxy is added a url. It appears that myOtherStore is actually using the reader of myStore. Can someone explain to me what's going on?
Ext.define('CustomProxy', {
alias: 'proxy.custom',
extend: 'Ext.data.proxy.Ajax',
reader: {
type: 'json',
root: 'defaultRoot'
}
});
And I instantiate two stores using that proxy:
var myStore = Ext.create('Ext.data.Store', {
storeId: 'myStore',
model: 'myModel',
proxy: {
type: 'custom',
url: 'myUrl.asmx'
}
});
var myOtherStore = Ext.create('Ext.data.Store', {
storeId: 'myOtherStore',
model: 'myOtherModel',
proxy: {
type: 'custom',
url: 'myOtherUrl.asmx'
}
});
So all I've done with the proxy is added a url. It appears that myOtherStore is actually using the reader of myStore. Can someone explain to me what's going on?