日期:2014-05-19 浏览次数:20763 次
Map request=(Map)ActionContext.getContext().get("request"); List<Orderlist> curorder=orderservice.findBycurord(Integer.parseInt(userids)); User us=user.findById(Integer.parseInt(userids)); List<Userdet> det=userdet.findU(Integer.parseInt(userids)); List<OrderListT> olt=new ArrayList<OrderListT>(); //存放工具类的集合 for(Orderlist ord:curorder){ OrderListT ordt=new OrderListT(); //工具类 //转换开始 ordt.setId(ord.getId()); ordt.setNum(ord.getNum()); Netpoint net=netService.findbyId(ord.getSource()); ordt.setSource(net.getNetname()); net=netService.findbyId(ord.getDestin()); ordt.setDestin(net.getNetname()); ordt.setPrice(ord.getPrice()); ordt.setTypename("国内件"); Category cate=cateService.findid(ord.getClassname()); ordt.setClassname(cate.getClassname()); ordt.setUsername(ord.getUserid()); Orderstatus sta=orderstaService.findid(Integer.parseInt(ord.getStatus())); ordt.setStatus(sta.getStatusname()); ordt.setBedate(ord.getBedate()); ordt.setEndate(ord.getEndate()); //转化结束 olt.add(ordt); //添加进ArrayList } request.put("curorder", curorder); //发送到struts.xml文件中该Action指定的result页面
<action name="userInfo" class="userInfoAction"> <result name="success">/personinfo.jsp</result> </action>
<s:iterator value="#request.curorder" id="order"> <li><s:property value="#order.num" /> <s:property value="#order.source" /> <s:property value="#order.destin" /> <s:property value="#order.status" /> <s:property value="#order.bedate" /> <s:property value="#order.endate" /></li> </s:iterator>