List<com.newer.business.pojo.Category> catelist=catemanager.getAll();
List<com.newer.business.pojo.Supply> suplist=supmanager.getAll();
request.setAttribute("categorylist",catelist);
request.setAttribute("supplylist",suplist);
//从请求中取得查询信息邦定到SearchRoleDto 对象中
SearchProductDto searchProductDto=WebUtils.bindReqeustParamToObject(SearchProductDto.class, request,Constants.DEFAULT_SELECT_DTO_PREFIX);
Page page=promanager.findRoles(searchProductDto);
SplitPageBean splitPageBean=this.convert(page);
//设置你要连接到哪个页面。用substring 来去除最前面的"/"
String parameter = mapping.getParameter();
String path=request.getServletPath();
String url=path.substring(path.lastIndexOf("/")+1)+"?"+parameter+"=list";
splitPageBean.setUrl(url);
//将分页数据绑定到请求中
request.setAttribute("productlist", splitPageBean);
System.out.println("splitPageBean:"+splitPageBean.getPageSize());
return mapping.findForward("savesuccess");
最近才接触到hibernate、感觉用得还可以、但是深入以后、麻烦不断
尤其是这段时间和Struts整合在一起后、很是困惑啊!光搞清它的流程就费了我不少的力气
天天埋头苦干、终于是让我有所收获啊!
这几天在搞分页、轻松与否、就看自己的心态、积极向上嘛!我开发软件并不久、但我这个
人很乐观、发现慢慢的我把编代码当成了自己的一种娱乐方式、我这个菜鸟何时能够飞上枝头啊!
自己坚持、不断的去探索、去发现新的事务、接受新的事务。