PDA

View Full Version : How to add store for eventStore in Ext Scheduler in Sencha Architect



rakesh.h
7 May 2014, 6:52 AM
I have created model for the store which is overridden to use
"extend: 'Sch.model.Event'"



Ext.define('MyApp.model.Event', {
extend: 'Ext.data.Model',

requires: [
'MyApp.model.override.Event'
],

fields: [
{
name: 'Id',
type: 'string'
},
{
name: 'Name',
type: 'string'
},
{
dateFormat: 'Y-m-d H:i',
name: 'StartDate',
type: 'date'
},
{
dateFormat: 'Y-m-d H:i',
name: 'EndDate',
type: 'date'
},
{
name: 'ResourceId',
type: 'string'
}
]
});

Ext.define('MyApp.model.override.Event', {
override: 'MyApp.model.Event',
extend: 'Sch.model.Event'

});


i have used above model in store


Ext.define('MyApp.store.eventStore', {
extend: 'Ext.data.Store',

requires: [
'MyApp.model.Event'
],

constructor: function(cfg) {
var me = this;
cfg = cfg || {};
me.callParent([Ext.apply({
autoLoad: true,
model: 'MyApp.model.Event',
storeId: 'eventStore',
data: [
{
Id: 'e1',
ResourceId: 'location1',
Name: 'Event 1',
StartDate: '2014-04-21 09:00',
EndDate: '2014-04-21 11:00'
},

],
proxy: {
type: 'ajax',
reader: {
type: 'json'
}
}
}, cfg)]);
}
});


i have assigned store to eventStore

eventStore : MyApp.store.eventStore

events are not displaying in the Scheduler Grid. Where i am going wrong?
I am new to sencha architect. Please help me.

mankz
4 Nov 2014, 7:07 AM
Better to ask Scheduler questions in the Bryntum forums. www.bryntum.com/forum