PDA

View Full Version : Ext Calendar



cuongnh
29 Nov 2011, 3:07 AM
this is my code:

Ext.onReady(function () {
Ext.QuickTips.init();
var url =
{
local: '@Url.Content(ViewBag.Local)'
};

this.eventStore = new Ext.data.JsonStore({
storeId: 'eventStore',
root: 'placements',
proxy: new Ext.data.MemoryProxy({
load: url.local
}),
fields:
[
{ name: 'server_id', mapping: 'server_id', type: 'numeric' },
{ name: 'start_date', mapping: 'start_date', type: 'date', dateFormat: 'Y-m-dTh:i:s' },
{ name: 'end_date', mapping: 'end_date', type: 'date', dateFormat: 'Y-m-dTh:i:s' },
{ name: 'comments', mapping: 'comments', type: 'string' },
{ name: 'region_id', mapping: 'region_id', type: 'int' }
],
writer: new Ext.data.JsonWriter(),
idProperty: Ext.ensible.cal.EventMappings.EventId.mapping || 'server_id'
});

eventStore.load();

var cal = new Ext.ensible.cal.CalendarPanel({
eventStore: eventStore,
width: 966,
height: 650
});

cal.render("content");
});

I will be greatful if anyone help me,

does the Store definition wrong?
data not show,
Error: data[M.StartDate.name] is undefined


best regards.

i am using spring mvc 3 and extjs. for now,I managed tocreate a GridPanel and load store from the controller.

mitchellsimoens
29 Nov 2011, 7:04 AM
Are you using Ext JS 3 or 4 version?

cuongnh
29 Nov 2011, 10:08 AM
I'm using ExtJS 3.

mitchellsimoens
29 Nov 2011, 2:48 PM
Moved to the Ext JS 3 forum... please post in the correct forum and do not double post. I have delete the duplicate post.