JSP中使用Flexigrid来显示数据列表
Flexigrid中使用的JSON数据格式
现在遇到个问题就是,我得怎么把页面上的参数给传到后台去?
URL传参过不去, Action中用@ModelAttribute也取不到!
我要做的就是在页面上点击查询按钮后把表单数据传到Action的ProgramPrList方法中去,该怎么传?
代码如下:
后台Action:
[code="java"]
@RequestMapping(value="/prlist")
@ResponseBody
public String ProgramPrList(HttpServletRequest request, HttpSession session) throws SQLException{
List proList = null;
JSONArray object = null;
try {
String proname = (String)request.getParameter("proname");
String protag = (String)request.getParameter("protag");
proList = ArrayList();
proList.add(proname);
proList.add(protag);
} catch (RuntimeException e) {
e.printStackTrace();
return ACTION_ERROR;
}
return object.toString();
}
[/code]
前台JSP:
[code="html"]
[/code]