2013-03-17 53 views
3

我试图用ExtJS的代理休息访问REST服务,但正在发送的URL看起来奇怪,一起来看看:ExtJS的4.2代理休息ID参数

/REST/V1 /通讯组列表/ 1 * ?id = 1 *

我不知道为什么'id'正在发送。 它建议立即进行删除发送'/rest/v1/distribution-list/1' 任何想法? 这是我的模型

Ext.define('Wave.model.DistributionList', { 
    extend: 'Ext.data.Model', 
    fields: [ 
     {name: 'id'}, 
     {name: 'name', type: 'string'}, 
     {name: 'status', type: 'string'} 

    ], 

    proxy: { 
     type: 'rest', 
     noCache: false, 
     reader: { 
      type: 'json' 
     }, 
     writer: { 
      type: 'json' 
     }, 
     actionMethods: { 
      create: 'POST', 
      read: 'GET', // defaults to GET 
      update: 'POST', 
      destroy: 'DELETE' 
     }, 
     api: { 
      read: '/rest/v1/distribution-list/', 
      create: '/rest/v1/distribution-list/', 
      update: '/rest/v1/distribution-list/', 
      destroy: '/rest/v1/distribution-list/' 
     } 



    } 

}); 

干杯

-Henrique

回答

0

的ID已经发送由Extjs.you设置好的可以,使用idParam来改变为另一种改变;

0

与煎茶触摸2.3.1和休息代理工作,ExtJS的创建了该URL与查询字符串参数的操作方法,就像你说的:/ REST/V1 /分发列表/ ID = 1?。 如果你不想追加ID,您可以更改appendId为false内部代理配置。