我在开发Ext+SSH的一个应用时,用Ext的jsonStore调用Struts2的Action中的方法,并返回JSON数据格式的数据如下:
this.success = true;
   this.totalCount =  this.page.getTotalCount();
   this.result = jb.toString() ;
   System.out.println(result);
这里采用的是Struts2的json-pluing包转换json格式,我在前台是这样写的:/** ****************************历史记录列表,连接数据库操作...***********************************/
HistoryGridPanel = Ext.extend(Ext.grid.GridPanel, {
_store : null,
constructor : function() {
//解析数据库返回Json格式数据
this._store = new Ext.data.JsonStore({
autoLoad: true, //自动加载数据
url : "manage!loginHistory.action",
root : 'result',//对应一个数组,该数组可能有N个对象
totalProperty : 'totalCount',//总共的数据条数
method : 'post',
remoteSort : true,//远程排序
fields : ["id","ip","time"]//从查找的数据中获取这三个字段
});
HistoryGridPanel.superclass.constructor.call(this, {
width : 400,
id : "historygrid",
height : 380,
loadMask : true,
viewConfig : {
forceFit : true//列宽自动延伸
},
ds : this._store,
stripeRows : true,//有波纹特效
columns : [new Ext.grid.RowNumberer(), //自动显示行号
 {
header : "登陆IP地址",
sortable : true,
dataIndex : 'ip'//引用ip的数据
}, {
header : "登陆时间",
name : "time",
sortable : true,
dataIndex : 'time'//引用time的数据
}],
sm : new Ext.grid.RowSelectionModel({//单行选择模式
singleSelect : true
}),
bbar : new Ext.PagingToolbar({//分页工具条
pageSize : 15,//每页显示几条数据
store : this._store,//与store相关联,与表格共享数据模型
displayInfo : true,//是否显示数据信息
displayMsg : "显示 {0} -- {1}条,共 {2} 条"
   })
});
this._store.load({//传参
params : {
 start : 0,//指示从第几个数据开始显示
 limit : 15//指从start开始一共要用多少条数据
       } 
        });
}
});
我在firefox的开发后台能看到这样的反馈:现在我的程序界面大概只能展示成这样请教一下:为什么我这样显示不了数据?海还有那个{1}的值为什么会那样??