<li data-options="attributes:{'url':'item-list'}">查询商品</li>查询商品点击会得到item-list,然后传给pageController中{page},正好是string page参数的值最后return page,即item-list,到视图解析器找item-list的页面,实现跳转,读取数据时与前端的相应页面对应起来即可
找页面
@RequestMapping("/{page}")
public String showpage(@PathVariable String page) {
return page;
}
传参数,和item-list里面的URL对应起来
data-options="singleSelect:false,collapsible:true,pagination:true,url:'/item/list',method:'get',pageSize:30,toolbar:toolbar">
@RequestMapping(value = "/item/list", produces = MediaType.APPLICATION_JSON_VALUE + ";charset=utf-8")
@ResponseBody
public EUDataGridResult getItemList(Integer page, Integer rows) {
EUDataGridResult result = itemService.getItemList(page, rows);
return result;
}