Monday, June 20, 2011

Ext JS : Data Model proxy for Json and XML return type

JSON RETURN DATA

If you data is returned in JSON format then your proxy for Data Model will look like :
Ext.define("Post", {
extend: 'Ext.data.Model',
proxy:
{
type: 'rest',
url : 'http://xyz.com/ID/18/',
reader: {
type: 'json',
root: 'CUSTOMER'
}
}



XML Return Data

Ext.define("Post", {
extend: 'Ext.data.Model',
proxy: {
type: 'ajax',
url : 'http://xyz.com/ID/18',
reader: {
type: 'xml',
record: 'CUSTOMER'
}
},

No comments:

Gray Failures: What is it and how to detect one?

If you are reading this article , i guess you are curious to know about gray failures and different methods to detect gray failures.  Hopefu...