Skip to content

Instantly share code, notes, and snippets.

@timraymond
Created March 16, 2012 01:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timraymond/2048025 to your computer and use it in GitHub Desktop.
Save timraymond/2048025 to your computer and use it in GitHub Desktop.
Sencha Example
Ext.define("app_namespace.model.model_name", {
extends: 'Ext.data.model',
config: {
fields: [
{ name: 'some_identifier', type: 'string' }
]}
})
Ext.define("app_namespace.store.store_name", {
extends: 'Ext.data.store',
config: {
model: 'app_namespace.model.model_name',
proxy: {
type: 'ajax',
url: '/file/location/script.php',
reader: {
type: 'json',
rootProperty: 'root_name of items',
}
}
}
});
// Then you can load the data with
Ext.getStore('store_name').load({
callback: 'somefunction';
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment