日期:2014-05-16 浏览次数:20344 次
@RequestMapping(value="/prlist") @ResponseBody public String ProgramPrList(HttpServletRequest request, HttpSession session) throws SQLException{ List<Program> proList = null; JSONArray object = null; try { String proname = (String)request.getParameter("proname"); String protag = (String)request.getParameter("protag"); proList = ArrayList<Program>(); proList.add(proname); proList.add(protag); } catch (RuntimeException e) { e.printStackTrace(); return ACTION_ERROR; } return object.toString(); }
<form action="${AP_ROOT}/program/prinit" id="sechForm" name="sechForm" method="post"> <select id="protype" name="protype"> <option value="2">电影</option> <option value="1">电视剧</option> </select> 名称<input id="proname" name="proname" type="text"/> 关键字<input id="protag" name="protag" type="text"/> <input id="btnSech" type="submit" value="查询"/> </form> <table id="menuTabl" class="flexme3" style="display: none"></table> <script type="text/javascript"> $(".flexme3").flexigrid({ url: '${AP_ROOT}/program/prlist', method: 'get', dataType : 'json', colModel : [ {display: '编号', name : 'programid', width : 100, sortable : true, align: 'center'}, {display: '节目名称', name : 'name', width : 160, sortable : true, align: 'left'}, {display: '节目类型', name : 'typeid', width : 80, sortable : true, align: 'left'}, {display: '时长', name : 'programlength', width : 80, sortable : true, align: 'left'}, {display: '上架时间', name : 'addedtime', width : 100, sortable : true, align: 'left'} ], title: false, autoload: true, resizable: false, singleSelect: true, //仅允许选择单行 width: 910, height: 443 }); </script>