Hello all,
I have a Panel view whose data (loaded from a store) depends on a proxy parameter (GET parameter for the json data retrieved). Store has then autoload = false set
I'm trying then (on the panel activation) to:
- get store ID
- set proxy parameter for the store (url)
- load data (store.load()) if I'm correct
- take the data and put on the panel HTML
however there is no way I can have the store filled with data (unless I'm misunderstanding some commands / point of my code)
here is the example
store:
Code:
Ext.define('app.store.CDetail', {
extend: 'Ext.data.Store',
config: {
storeId: 'cdetailstore',
model: "app.model.Data",
proxy: {
type: 'ajax',
url: 'www.myserver.com/info.php?task=infodetail&id=1&type=",
reader: {
type: 'json'
}
},
autoLoad: false
}
});
Model:
Code:
Ext.define('app.model.Data', {
extend: 'Ext.data.Model',
config: {
fields: [
{name: 'data', type: 'string'}
]
}
});
Controller:
Code:
Ext.define('app.controller.CDetail', {
extend: 'Ext.app.Controller',
config: {
refs: {
CDetail: 'CDetail'
},
control: {
'CDetail': {
activate: 'fillDetail'
}
}
},
fillDetail: function() {
var store = Ext.getStore('cdetailstore');
var detailPanel = this.getConferenceDetail();
var type = detailPanel.config.type;
store.load();
debugger;
}
});
store array data is always 0
can someone help me please???
thank you in advance
alex