[阅读: 280] 2009-06-09 07:48:16
// A single store using the Proxy, Reader and Writer together
// through a RESTful interface
var store = new Ext.data.Store({
id: 'user',
restful: true, // <-- This Store is RESTful
proxy: proxy,
reader: reader,
writer: writer // <-- plug a DataWriter into the store just as you would a Reader
});
//define and we'll handle the rest
var proxy = new Ext.data.HttpProxy({
api: {
read : 'app.php/users/read',
create : 'app.php/users/create',
update : 'app.php/users/update',
destroy : 'app.php/users/destroy'
}
});