netslayer
11 Aug 2011, 3:18 PM
I have a store defined with autoLoad: false but when using the MVC application approach they seem to autoload during the application initiation. Any ideas on how to stop this?
Here is a code sample chopped down.
Ext.define('V.store.Properties', {
extend: 'Ext.data.Store',
model: 'V.model.Property',
autoLoad: false,
pageSize: 999,
proxy: {
type: 'ajax',
url: '...endPoint',
reader: {
type: 'json',
root: 'data',
totalProperty: 'totalCount',
idProperty: 'id'
}
}
});
Ext.define('V.controller.Properties', {
extend: 'Ext.app.Controller',
stores: [
'Properties'
],
views: [
'property.Grid'
],
models: [
'Property'
]
});
Ext.define('V.view.property.Grid', {
extend: 'Ext.grid.Panel',
store: 'Properties'
});
var v = Ext.create('Ext.app.Application', {
name: 'V',
appFolder: 'app',
controllers: [
'Properties'
],
launch: function() {
// more code here that creates an instance of V.view.property.Grid
}
});
Here is a code sample chopped down.
Ext.define('V.store.Properties', {
extend: 'Ext.data.Store',
model: 'V.model.Property',
autoLoad: false,
pageSize: 999,
proxy: {
type: 'ajax',
url: '...endPoint',
reader: {
type: 'json',
root: 'data',
totalProperty: 'totalCount',
idProperty: 'id'
}
}
});
Ext.define('V.controller.Properties', {
extend: 'Ext.app.Controller',
stores: [
'Properties'
],
views: [
'property.Grid'
],
models: [
'Property'
]
});
Ext.define('V.view.property.Grid', {
extend: 'Ext.grid.Panel',
store: 'Properties'
});
var v = Ext.create('Ext.app.Application', {
name: 'V',
appFolder: 'app',
controllers: [
'Properties'
],
launch: function() {
// more code here that creates an instance of V.view.property.Grid
}
});