如何在extjs中的store对象中加载数据

时间:2014-01-10 09:37:33

标签: extjs4

Ext.define('ParolePoint', {
    extend: 'Ext.data.Model',
    fields: ['state', 'entry', 'exit']
});

var store = Ext.create('Ext.data.Store', {
        model: 'ParolePoint',
        data : [

  {state: 'Connecticut', entry: 45000, exit:28211},
  {state: 'Maine', entry:3627, exit:3692},
  {state: 'Massachusetts', entry:98952, exit:96142},
  {state: 'New Hampshire', entry:3789, exit:3697},
  {state: 'New Jersey', entry:49728, exit:55858},
  {state: 'New York', entry:62419, exit:64147},
  {state: 'Pennsylvania', entry:13966, exit:13240},
  {state: 'Rhode Island', entry:6262, exit:6012},
  {state: 'Vermont', entry:4884, exit:5487},
]
});
 store.loadData(data);

 document.write(store.state); 

我目前正在使用我提供的原始数据,但我想直接从用户那里获取输入,但我没有得到。请你好我是extjs 4的新手?

0 个答案:

没有答案