从JSON存储的子集创建存储

时间:2013-01-21 19:27:28

标签: javascript json extjs4

我有一个JSON存储定义如下

var subAccountStore = new Ext.data.JsonStore({
  autoLoad: true,
  proxy: {
    type:'ajax',
    url : '/opUI/json/subaccount.action?name="ABC"'
  },
  fields: ['accountName', 'quantity','accountNumbers'],
  listeners: {
    load: function(store, records, success) {
      // ???????
    },
    single: true
  }
});

和样本数据是

[{"accountName":"'ABC'","quantity":100,"accountNumbers":['12345A','12345B','12345C']},{"accountName":"'XYZ'","quantity":100,"accountNumbers":['99999A','99999B','99999C']}]

如何为accountNumbers动态创建商店并分配到网格内的组合框?

由于 Tharahan

1 个答案:

答案 0 :(得分:0)

对于帐号,您必须单独声明商店。例如,在面板项

HTTP_COOKIE

}]

这里商店必须如下所示声明

Rack::Request

});