extjs4.0,store自动加载时,能否传参数
点击(此处)折叠或打开
-
autoLoad : true,
-
proxy : {
-
type : \'rest\',
-
-
// 通过拼接url的方式不太友好。
-
// url : \'api/machine/device?organization=\'+ewayUser.organizationId,
-
-
url : \'api/machine/device\',
-
reader : {
-
type : \'json\',
-
root : \'data\'
-
},
-
params : {
-
organization : ewayUser.organizationId
- }
解答:
extraParams : Object
Extra parameters that will be included on every request. Individual requests with params of the same name will override these params when they are in conflict.
点击(此处)折叠或打开
-
autoLoad : true,
-
proxy : {
-
type : \'rest\',
-
-
// 通过拼接url的方式不太友好。
-
// url : \'api/machine/device?organization=\'+ewayUser.organizationId,
-
-
url : \'api/machine/device\',
-
extraParams : {organization:ewayUser.organizationId},
-
reader : {
-
type : \'json\',
-
root : \'data\'
-
},
-
params : {
-
organization : ewayUser.organizationId
-
}
- }
转自:http://bbs.ibeifeng.com/read-htm-tid-66069.html
推荐:基于SSH+Maven+Extjs4+MySQL技术实战开发CRM客户关系管理系统http://www.ibeifeng.com/goods-371.html
基于J2EE平台下SSH2+JBPM4.4+ExtJs4.1 框架整合&项目实战(HR项目开发、SSH2作为框架)http://www.ibeifeng.com/goods-420.html