(Struts2)jsp中生成了一个存放记录的数组,怎样才能被action接收到? 30
List<Header>list=newArrayList<Header>();for(...){if(request.getParameter(rowflag)==nu...
List<Header> list = new ArrayList<Header>();
for(...){
if(request.getParameter(rowflag)==null||request.getParameter(rowflag).equals("null"))
if(request.getParameter(colflag)==null||request.getParameter(colflag).equals("null")){
out.println("<th rowspan="+rowspan+" colspan="+colspan+">"+request.getParameter(tdid)+"</th>");
//把所有的非空td header参数封装进一个List中传给action
Header hrec = new Header();
hrec.setId(Integer.parseInt(rptid));
hrec.setRowid(i);
hrec.setColid(j);
hrec.setRowspan(rowspan);
hrec.setColspan(colspan);
hrec.setHeaderstring(request.getParameter(tdid));
list.add(hrec);}
我要让我的action最后能够接收到这个list,以便存进数据库,谢谢了 展开
for(...){
if(request.getParameter(rowflag)==null||request.getParameter(rowflag).equals("null"))
if(request.getParameter(colflag)==null||request.getParameter(colflag).equals("null")){
out.println("<th rowspan="+rowspan+" colspan="+colspan+">"+request.getParameter(tdid)+"</th>");
//把所有的非空td header参数封装进一个List中传给action
Header hrec = new Header();
hrec.setId(Integer.parseInt(rptid));
hrec.setRowid(i);
hrec.setColid(j);
hrec.setRowspan(rowspan);
hrec.setColspan(colspan);
hrec.setHeaderstring(request.getParameter(tdid));
list.add(hrec);}
我要让我的action最后能够接收到这个list,以便存进数据库,谢谢了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询