Sencha touch Sencha Touch-RESTful load()特定实例URL问题(商店/模型)
在模型/存储对象中使用rest代理加载特定实例(load()函数)似乎有问题。例如: 代码: 此代码复制自Sencha touch的API。生成的URL是。。。而不是所需的(和文档化的)url 使用带有参数的store.load时也会发生这种情况 我做错什么了吗? 谢谢Sencha touch Sencha Touch-RESTful load()特定实例URL问题(商店/模型),sencha-touch,Sencha Touch,在模型/存储对象中使用rest代理加载特定实例(load()函数)似乎有问题。例如: 代码: 此代码复制自Sencha touch的API。生成的URL是。。。而不是所需的(和文档化的)url 使用带有参数的store.load时也会发生这种情况 我做错什么了吗? 谢谢 Tid参数已记录在案,但尚未实施。这已在sencha论坛[]中讨论过。一些不完整的修复写在第8和第13篇文章中 Ext.regModel('User', { fields: ['id', 'name', 'email']
Tid参数已记录在案,但尚未实施。这已在sencha论坛[]中讨论过。一些不完整的修复写在第8和第13篇文章中
Ext.regModel('User', {
fields: ['id', 'name', 'email'],
proxy: {
type: 'rest',
url : '/users'
}
});
//get a reference to the User model class
var User = Ext.ModelMgr.getModel('User');
//Uses the configured RestProxy to make a GET request to /users/123
User.load(123, {
success: function(user) {
console.log(user.getId()); //logs 123
}
});