Skip to content

Instantly share code, notes, and snippets.

@MihailoJoksimovic
Created June 23, 2014 10:10
Show Gist options
  • Save MihailoJoksimovic/67754eb186c3319883f1 to your computer and use it in GitHub Desktop.
Save MihailoJoksimovic/67754eb186c3319883f1 to your computer and use it in GitHub Desktop.
var store = Ext.create('Ext.data.Store', {
fields: ['extjs_state_user_data_id', 'user_id', 'name', 'value'],
autoSync: true,
proxy: {
type: 'ajax',
reader: {
type: 'json',
root: 'results'
},
writer: {
type: 'json',
root: 'data',
encode: true,
allowSingle: false
},
api: {
create: '/modules/core/ExtjsStateManager/create',
read: '/modules/core/ExtjsStateManager/load',
update: '/modules/core/ExtjsStateManager/update',
destroy: '/modules/core/ExtjsStateManager/remove'
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment