--miCZar--
24 Oct 2010, 7:50 PM
Hi all (my first post here),
Is there any possibility to hook before/after deserialization in Ext.data.JsonStore (or if its taken in Ext.data.HttpProxy) to work with received data? Why? In ASP.NET when calling web service (via Ext.data.HttpProxy in this case) ScriptManager serializes date like this "\/Date(ticks)\/" and after deserialization for example I get "/Date(1198908717056)/" and that causes "some" problems. I would like to hook just before deserialization and decode it for proper format so when the data is deserialized it would go smoothly.
I'm completly new to ExtJS (2 days) so any ideas would be appreciated.
I need dates in the store below decoded correctly.
var store = new Ext.data.JsonStore({
root: 'd.Entities',
totalProperty: 'TotalCount',
idProperty: 'Id',
autoLoad: true,
fields: [
{ name: 'Id', type: 'int' }, 'From', 'Subject', 'Body', 'Sent'
],
proxy: new Ext.data.HttpProxy({
url: 'Services.asmx/GetMessages',
headers: { 'Content-type': 'application/json' }
})
});
Is there any possibility to hook before/after deserialization in Ext.data.JsonStore (or if its taken in Ext.data.HttpProxy) to work with received data? Why? In ASP.NET when calling web service (via Ext.data.HttpProxy in this case) ScriptManager serializes date like this "\/Date(ticks)\/" and after deserialization for example I get "/Date(1198908717056)/" and that causes "some" problems. I would like to hook just before deserialization and decode it for proper format so when the data is deserialized it would go smoothly.
I'm completly new to ExtJS (2 days) so any ideas would be appreciated.
I need dates in the store below decoded correctly.
var store = new Ext.data.JsonStore({
root: 'd.Entities',
totalProperty: 'TotalCount',
idProperty: 'Id',
autoLoad: true,
fields: [
{ name: 'Id', type: 'int' }, 'From', 'Subject', 'Body', 'Sent'
],
proxy: new Ext.data.HttpProxy({
url: 'Services.asmx/GetMessages',
headers: { 'Content-type': 'application/json' }
})
});