先後臺頁面跳轉及參數傳遞

<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;
}app

相關文章
相關標籤/搜索