PDA

View Full Version : Calender integration to SpringMVC



kitarp
2 Jul 2013, 7:42 AM
I am using Sencha 4.2.0. On sever side I am using SpringMCV with JSON response. I am loading eventStore in my App.js as follows :


this.eventStore = Ext.create('Ext.calendar.data.MemoryEventStore', { autoLoad : true, noCache : false, proxy : { type : 'rest', url : 'serverCall.json', reader : { type : 'json', root : 'evts' } } });



My Server Response is as follows :
data: Object
calendarId: 0
endDate: null
eventId: 0
isAllDay: false
isNew: false
notes: "comment1"
reminder: ""
startDate: null
title: "4"
events: Object
hasListeners: statics.prepareClass.k
id: "Ext.calendar.data.EventModel-ext-record-193"
index: 0
internalId: "ext-record-193"
modified: Object
phantom: false
raw: Object
calendarId: 0
endDate: 1373451141
eventId: 129
isAllDay: false
isNew: false
notes: "comment1"
reminder: null
startDate: 1373364741
title: "4"
store: i
stores: Array[1]
__proto__: Object

I am facing two issues. :
1) The data received from server is set into "raw" instead of "data" as shown above.
2) After debugging, I found that my AbstractCalender.js --> isEventVisible: function(evt) method is called into infinite loop. Hence, my calender is not able to view any data coming from server.

Note:
The data for startDate and endDate from the server is in set into java.util.Date format which is in java.util.Long in the database.

Please let me know what I am doing wrong here. Thanks in advance for your help.

slemmon
3 Jul 2013, 10:45 PM
While the calendar example is distributed by Sencha in the SDK the calendar is actually built and supported by ext.ensible. You might pose the question here:
http://ext.ensible.com/forum/