Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Extjs 如何从存储中获取值字段_Extjs - Fatal编程技术网

Extjs 如何从存储中获取值字段

Extjs 如何从存储中获取值字段,extjs,Extjs,我用ExtJS 3.4创建了一个商店,下面是我的代码: var itiStore = new Ext.data.JsonStore({ root: 'getItiResultResult', fields: [ {name: 'Arrival'}, {name: 'ColumnsName'}, {name: 'Error'}, {name: 'Points', mapping: 'Points'},

我用ExtJS 3.4创建了一个商店,下面是我的代码:

var itiStore = new Ext.data.JsonStore({
    root: 'getItiResultResult',
    fields: [
        {name: 'Arrival'},
        {name: 'ColumnsName'},
        {name: 'Error'},
        {name: 'Points', mapping: 'Points'},
        {name: 'La', mapping: 'Points.La'},
        {name: 'Lo', mapping: 'Points.Lo'},
        {name: 'Rows', mapping: 'Rows'},
        {name: "ChangeRowColor", mapping: 'Rows.ChangeRowColor'},
        {name: "CumDistance", mapping: 'Rows.CumDistance'},
        {name: "CumTime", mapping: 'Rows.CumTime'},
        {name: "Direction", mapping: 'Rows.Direction'},
        {name: "Distance", mapping: 'Rows.Distance'},
        {name: "La", mapping: 'Rows.La'},
        {name: "Lo", mapping: 'Rows.Lo'},
        {name: "RoadMap", mapping: 'Rows.RoadMap'},
        {name: "Step", mapping: 'Rows.Step'},
        {name: "Time", mapping: 'Rows.Time'},
        {name: "dCumDist", mapping: 'Rows.dCumDist'},
        {name: "dCumTime", mapping: 'Rows.dCumTime'},
        {name: 'Start'},
        {name: 'TotDistance'},
        {name: 'TotTime'}
    ]
});
我曾经向我的店铺展示:

itiStore.loadDataExt.decoderesponse.responseText,false; console.logJSON.parseresponse.responseText

我如何才能获得“路线图”的价值,并对其进行恢复以将其显示出来


提前感谢你们的帮助。

存储区包含许多记录,因此如果您需要其中一条记录,请:

var record = store.getAt(22); // or other way of getting a record
var roadMap = record.get('RoadMap'); 

如果您希望存储区仅包含路线图,则创建另一个仅包含该字段的存储区,并在解码JSON响应后,使用解码后的数据加载两个存储区。

谢谢您的回答!但这对我不起作用。。它给我这个错误:uncaughtypeerror:无法读取未定义的属性'get'!!有什么想法吗,先生?我想要的是当我点击我的boutton时,路线图就会出现在我的应用程序中!顺便说一句,我计算了行程,我希望当我点击我的Boutto时会显示消息路线图。首先,必须加载存储,其次,我使用了任意索引22-您可以使用0来获取第一条记录或0和存储之间的任何其他索引。getCount-1