2013-03-17 2 views
3

, 좀 걸릴 내가 에 extjs 프록시 나머지를 사용하여 REST 서비스에 액세스하려고하지만, 전송되는 URL이 이상한 같습니다의 ExtJS 4.2 프록시 나머지 id 매개 변수

/휴식/V1/유통 목록을/1 * ? id = 1 *

'id'가 전송되는 이유를 알지 못합니다. 그것은 shoul을 보내십시오 '/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를 보내기가 다른 하나에 변경에 idParam를 사용하는 것으로 변경할 수 있습니다 Extjs.you에 의해 잘 살고있다되었습니다;

0

Sencha-Touch 2.3.1 및 나머지 프록시를 사용하여 ExtJS는/rest/v1/distribution-list /? id = 1과 같이 쿼리 문자열 매개 변수를 사용하여 작업 메서드에 대한 URL을 만듭니다. id를 추가하지 않으려면 proxy config에서 appendId를 false로 변경할 수 있습니다.