求助EASYUIGRID访问注解方式的SPRING控制层
用到注解方式的SPRING控制层,前台数据显示 用的EASYUIGRID,但是在同过EASYUIGRID的URL访问SPRING的控制层获取JSON格式数据时确不能访问,不知道为什么。我的代码如下
$(function() {
$('#tt').datagrid( {
title : '图书信息',
width : 1300,
height : 400,
nowrap : false,
striped : true,
collapsible : true,
pageSize:5,
url : '../system/json.do',
loadMsg : '数据装载中......',
sortName : 'code',
sortOrder : 'desc',
remoteSort : false,
columns : [ [ {
title : '编号',
field : 'id',
width : '100',
rowspan : 2,
align : 'center',
hidden:true
},{
title : '名称',
field : 'book_name',
width : '150',
rowspan : 2,
align : 'center',
editor:'text'
}, {
title : '出版社',
field : 'publish_name',
width : '150',
rowspan : 2,
align : 'center'
}, {
title : '作者',
field : 'author',
width : '150',
rowspan : 2,
align : 'center'
}, {
title : '出版日期',
field : 'publish_date',
width : '150',
rowspan : 2,
align : 'center'
}, {
title : '单价(元)',
field : 'price',
width : '100',
rowspan : 2,
align : 'center'
}
] ],
onBeforeEdit:function(index,row){
row.editing = true;
updateActions(alert());
},
onAfterEdit:function(index,row){
row.editing = false;
updateActions(alert());
},
pagination : true,
rownumbers : false,
showFooter: true,
toolbar : [ {
text : '新增至购物车',
iconCls : 'icon-add',
handler : function() {
addToCart();
}
}, {
text : '查看购物车',
iconCls : 'icon-goto',
handler : function() {
window.location.href="../system/json.do";
}
} ]
});
$('#tt').datagrid('getPager').pagination({
pageSize: 10,//每页显示的记录条数,默认为10
displayMsg:'当前显示第 {from} 条到第 {to} 条记录,共有 {total} 条记录',
showPageList:false,
beforePageText:'当前第',
afterPageText:'页'
});
});
但是在一个连接window.location.href="../system/json.do";却可以访问到控制层,而URLurl : '../system/json.do'换成其他写法url : '/system/json.do';
url : 'system/json.do';url : '项目名/system/json.do'都不行,请高手指点。