-
5 Oct 2012 1:58 AM #1
How to reference an array
How to reference an array
How can I import data from an array created somewhere else in the code in a GridView in Sencha Architect 2. I defined a Memo Proxy and a Array Reader which are used by a Store, but i don't see where i can define/reference this array.
The Proxy/Reader code:
-----------------------
Ext.define('MyApp.model.Model_Massnahmen', {
extend: 'Ext.data.Model',
proxy: {
type: 'memory',
reader: {
type: 'array'
}
},
fields: [
{
name: 'massnahme',
type: 'string'
},
{
dateFormat: '"d.m.Y"',
name: 'termin',
type: 'date'
},
{
name: 'verantwortlichkeit',
type: 'int'
}
]
});
The model code:
---------------
Ext.define('MyApp.store.Store_Massnahmen', {
extend: 'Ext.data.Store',
requires: [
'MyApp.model.Model_Massnahmen'
],
constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: false,
autoSync: false,
storeId: 'Store_Massnahmen',
model: 'MyApp.model.Model_Massnahmen',
fields: [
{
name: 'massnahme'
},
{
name: 'termin'
},
{
name: 'verantwortlichkeit'
}
]
}, cfg)]);
}
});
-
5 Oct 2012 1:09 PM #2
yourStore.loadData(yourArray);
Aaron Conran
@aconran
Sencha Architect Development Team


Reply With Quote