首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

struts+spring+hibernate的web施用<四> Web层代码编写(1)

2012-08-26 
struts+spring+hibernate的web应用四 Web层代码编写(1)package?com.game.products.web.actionsimport?j

struts+spring+hibernate的web应用<四> Web层代码编写(1)

package?com.game.products.web.actions;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?java.util.List;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.http.HttpServletRequest;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.http.HttpServletResponse;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.acegisecurity.AccessDeniedException;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.action.ActionForm;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.action.ActionForward;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.action.ActionMapping;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.actions.DispatchAction;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?com.game.commons.Pager;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?com.game.commons.PagerService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?com.game.products.model.Products;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?com.game.products.services.iface.ProductsService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?com.game.products.web.forms.ProductsForm;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?class?ProductsAction?extends?DispatchAction?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?ProductsService?productsService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?PagerService?pagerService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?显示所有信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doGetProducts(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????int?totalRows=productsService.getRows();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?currentPage=req.getParameter("currentPage");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?pagerMethod=req.getParameter("pagerMethod");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Pager?pager=pagerService.getPager(currentPage,?pagerMethod,?totalRows);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????List?productsList=productsService.getProducts(pager.getPageSize(),?pager.getStartRow());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("productsList",?productsList);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("PAGER",?pager);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("totalRows",?String.valueOf(totalRows));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?mapping.findForward("all");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?显示一条信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doGetProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?gameId=req.getParameter("gameId");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=(String)req.getParameter("fieldname");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=(String)req.getParameter("value");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Products?pd=productsService.getProduct(gameId);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("pd",?pd);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?mapping.findForward("one");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?添加信息页面
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doAddProductPage(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=(String)req.getParameter("fieldname");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=(String)req.getParameter("value");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?maxid=productsService.getMaxID();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("maxid",?maxid);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?mapping.findForward("add");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?添加信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doAddProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????ProductsForm?pf=(ProductsForm)form;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=pf.getFlag();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=pf.getFieldname();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=pf.getValue();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Products?pd=new?Products();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameCapacity(pf.getGameCapacity());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameId(pf.getGameId());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameMedia(pf.getGameMedia());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameNameCn(pf.getGameNameCn());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameNameEn(pf.getGameNameEn());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameVersion(pf.getGameVersion());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameCopyright(pf.getGameCopyright());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameContent(pf.getGameContent());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(pf.getGamePrice().equals("")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????pd.setGamePrice(null);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????pd.setGamePrice(pf.getGamePrice());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????int?sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????try{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????productsService.addProduct(pd);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}catch(Exception?e){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=2;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(sign==1){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("success");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("failure");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?修改信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doUpdateProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????ProductsForm?pf=(ProductsForm)form;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?gameId=pf.getGameId();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=pf.getFlag();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=pf.getFieldname();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=pf.getValue();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Products?pd=productsService.getProduct(gameId);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameCapacity(pf.getGameCapacity());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameId(pf.getGameId());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameMedia(pf.getGameMedia());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameNameCn(pf.getGameNameCn());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameNameEn(pf.getGameNameEn());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameVersion(pf.getGameVersion());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameCopyright(pf.getGameCopyright());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????pd.setGameContent(pf.getGameContent());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(pf.getGamePrice().equals("")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????pd.setGamePrice(null);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????pd.setGamePrice(pf.getGamePrice());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????int?sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????try{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????productsService.updateProductd(pd);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}catch(Exception?e){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=2;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(sign==1){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("success");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("failure");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?删除信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doDeleteProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=(String)req.getParameter("fieldname");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=(String)req.getParameter("value");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?gameId=req.getParameter("gameId");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Products?pd=productsService.getProduct(gameId);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????int?sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????try{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????productsService.deleteProduct(pd);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}catch(Exception?e){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????sign=2;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(sign==1){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("success");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????return?mapping.findForward("failure");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?返回信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doReturnProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????if(flag.equals("1")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????int?totalRows=productsService.getRows();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????String?currentPage=req.getParameter("currentPage");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????String?pagerMethod=req.getParameter("pagerMethod");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????Pager?pager=pagerService.getPager(currentPage,?pagerMethod,?totalRows);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????List?productsList=productsService.getProducts(pager.getPageSize(),?pager.getStartRow());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("productsList",?productsList);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("PAGER",?pager);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("totalRows",?String.valueOf(totalRows));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}else?if(flag.equals("2")){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????fieldname=(String)req.getParameter("fieldname");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value=(String)req.getParameter("value");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????int?totalRows=productsService.getRows(fieldname,value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????String?currentPage=req.getParameter("currentPage");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????String?pagerMethod=req.getParameter("pagerMethod");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????Pager?pager=pagerService.getPager(currentPage,?pagerMethod,?totalRows);
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????List?productsList=productsService.queryProducts(fieldname,?value,pager.getPageSize(),?pager.getStartRow());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("productsList",?productsList);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("PAGER",?pager);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????req.setAttribute("totalRows",?String.valueOf(totalRows));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?mapping.findForward("all");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????/**?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*?查询信息
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ActionForward?doQueryProduct(
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionMapping?mapping,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????ActionForm?form,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletRequest?req,
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????HttpServletResponse?res){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?flag=req.getParameter("flag");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("flag",?flag);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?fieldname="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?value="";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????fieldname=(String)req.getParameter("fieldname");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????value=(String)req.getParameter("value");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????int?totalRows=productsService.getRows(fieldname,value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?currentPage=req.getParameter("currentPage");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????String?pagerMethod=req.getParameter("pagerMethod");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????Pager?pager=pagerService.getPager(currentPage,?pagerMethod,?totalRows);
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("fieldname",?fieldname);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("value",?value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????List?productsList=productsService.queryProducts(fieldname,?value,pager.getPageSize(),?pager.getStartRow());
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("productsList",?productsList);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("PAGER",?pager);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????req.setAttribute("totalRows",?String.valueOf(totalRows));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?mapping.findForward("all");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ProductsService?getProductsService()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?productsService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setProductsService(ProductsService?productsService)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.productsService?=?productsService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?PagerService?getPagerService()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?pagerService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setPagerService(PagerService?pagerService)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.pagerService?=?pagerService;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)

package?com.game.products.web.forms;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.http.HttpServletRequest;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.action.ActionMapping;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?org.apache.struts.validator.ValidatorForm;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?class?ProductsForm?extends?ValidatorForm?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????//????Fields?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameId;//编号
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameNameCn;//中文名称
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameNameEn;//英文名称
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameCapacity;//碟数
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameVersion;//版本
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameMedia;//介质
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameCopyright;//版权
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gamePrice;//价格
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?gameContent;//攻略
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?flag;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?fieldname;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????private?String?value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????//????Constructors
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?ProductsForm(){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameId=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameNameCn=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameNameEn=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameCapacity=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameVersion=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameMedia=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameCopyright=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gamePrice=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameContent=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????flag=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????fieldname=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????value=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????//?reset
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?reset(ActionMapping?mapping,?HttpServletRequest?request)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameId=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameNameCn=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameNameEn=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameCapacity=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameVersion=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameMedia=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameCopyright=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gamePrice=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????gameContent=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????flag=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????fieldname=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????value=null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????//????Property?accessors
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameCapacity()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameCapacity;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameCapacity(String?gameCapacity)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameCapacity?=?gameCapacity;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameId()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameId;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameId(String?gameId)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameId?=?gameId;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameNameCn()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameNameCn;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameNameCn(String?gameNameCn)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameNameCn?=?gameNameCn;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameNameEn()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameNameEn;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameNameEn(String?gameNameEn)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameNameEn?=?gameNameEn;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameVersion()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameVersion;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameVersion(String?gameVersion)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameVersion?=?gameVersion;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameMedia()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameMedia;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameMedia(String?gameMedia)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameMedia?=?gameMedia;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getFieldname()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?fieldname;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setFieldname(String?fieldname)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.fieldname?=?fieldname;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getFlag()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?flag;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setFlag(String?flag)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.flag?=?flag;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getValue()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setValue(String?value)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.value?=?value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameCopyright()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameCopyright;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameCopyright(String?gameCopyright)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameCopyright?=?gameCopyright;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGameContent()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gameContent;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGameContent(String?gameContent)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gameContent?=?gameContent;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?String?getGamePrice()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????return?gamePrice;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????public?void?setGamePrice(String?gamePrice)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????this.gamePrice?=?gamePrice;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)

<?xml?version="1.0"?encoding="ISO-8859-1"?>
struts+spring+hibernate的web施用<四> Web层代码编写(1)<!DOCTYPE?struts-config?PUBLIC
struts+spring+hibernate的web施用<四> Web层代码编写(1)????"-//Apache?Software?Foundation//DTD?Struts?Configuration?1.1//EN"
struts+spring+hibernate的web施用<四> Web层代码编写(1)????"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)<struts-config>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<form-beans>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<form-bean?name="productsForm"?type="com.game.products.web.forms.ProductsForm"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</form-beans>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<global-forwards>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<forward?name="success"?path="/products/product_success.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<forward?name="failure"?path="/products/product_failure.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</global-forwards>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<action-mappings>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/getProducts"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<forward?name="all"?path="/products/products.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/getProduct"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<forward?name="one"?path="/products/product.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/deleteProduct"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/addProductPage"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<forward?name="add"?path="/products/addproduct.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/addProduct"?name="productsForm"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false"?input="/product_failure.jsp">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/updateProduct"?name="productsForm"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false"?input="/product_failure.jsp">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/returnProduct"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<forward?name="all"?path="/products/products.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<action?path="/queryProducts"?type="org.springframework.web.struts.DelegatingActionProxy"?parameter="method"?scope="request"?validate="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<forward?name="all"?path="/products/products.jsp"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</action>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</action-mappings>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<message-resources?parameter="com.game.resources.ApplicationResourcesProducts"?/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<plug-in?className="org.apache.struts.validator.ValidatorPlugIn">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<set-property?property="pathnames"
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????value="/WEB-INF/struts-validator/validator-rules.xml,/WEB-INF/struts-validator/validation.xml"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</plug-in>????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)</struts-config>

<!--?View?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/getProducts"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="pagerService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="pagerService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/getProduct"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/deleteProduct"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/addProductPage"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/addProduct"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/updateProduct"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/returnProduct"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="pagerService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="pagerService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<bean?name="/queryProducts"?class="com.game.products.web.actions.ProductsAction"?singleton="false">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="productsService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="productsService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<property?name="pagerService">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<ref?bean="pagerService"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</property>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</bean>

<?xml?version="1.0"?encoding="GB2312"?>
struts+spring+hibernate的web施用<四> Web层代码编写(1)<!DOCTYPE?web-app
struts+spring+hibernate的web施用<四> Web层代码编写(1)????PUBLIC?"-//Sun?Microsystems,?Inc.//DTD?Web?Application?2.3//EN"
struts+spring+hibernate的web施用<四> Web层代码编写(1)????"http://java.sun.com/dtd/web-app_2_3.dtd">
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)<web-app>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<display-name>游戏软件管理系统</display-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<context-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<param-name>log4jConfigLocation</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<param-value>/WEB-INF/classes/log4j.properties</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</context-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<context-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<param-name>contextConfigLocation</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<param-value>/WEB-INF/spring-context/applicationContext.xml</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????</context-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<filter>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<filter-name>Set?Character?Encoding</filter-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<filter-class>com.game.commons.SetCharacterEncodingFilter</filter-class>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<param-name>encoding</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<param-value>GB2312</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</filter>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<filter-mapping>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<filter-name>Set?Character?Encoding</filter-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<url-pattern>/*</url-pattern>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</filter-mapping>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-?Loads?the?root?application?context?of?this?web?app?at?startup.
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-?The?application?context?is?then?available?via
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-?WebApplicationContextUtils.getWebApplicationContext(servletContext).
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????<listener>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????</listener>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????<listener>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????</listener>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<!--?Action?Servlet?Configuration?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<servlet>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<servlet-name>action</servlet-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--?缺省?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????<param-name>config</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????<param-value>/WEB-INF/struts-config/struts-config.xml</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-name>debug</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-value>3</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-name>detail</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-value>3</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-name>nocache</param-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<param-value>yes</param-value>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</init-param>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<load-on-startup>2</load-on-startup>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</servlet>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<!--?Action?Servlet?Mapping?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<servlet-mapping>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<servlet-name>action</servlet-name>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<url-pattern>*.do</url-pattern>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</servlet-mapping>
struts+spring+hibernate的web施用<四> Web层代码编写(1)?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<!--?The?Welcome?File?List?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<welcome-file-list>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<welcome-file>products/index.jsp</welcome-file>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</welcome-file-list>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<!--?Struts?Tag?Library?Descriptors?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-uri>struts-bean</taglib-uri>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-uri>struts-html</taglib-uri>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-uri>struts-logic</taglib-uri>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-uri>struts-nested</taglib-uri>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<taglib-location>/WEB-INF/tld/struts-nested.tld</taglib-location>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</taglib>
struts+spring+hibernate的web施用<四> Web层代码编写(1)</web-app>

package?com.game.commons;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?java.io.IOException;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.Filter;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.FilterChain;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.FilterConfig;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.ServletException;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.ServletRequest;
struts+spring+hibernate的web施用<四> Web层代码编写(1)import?javax.servlet.ServletResponse;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?class?SetCharacterEncodingFilter?implements?Filter?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)protected?String?encoding?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)protected?FilterConfig?filterConfig?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)protected?boolean?ignore?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?void?init(FilterConfig?filterConfig)?throws?ServletException?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.filterConfig=filterConfig;
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.encoding=filterConfig.getInitParameter("encoding");
struts+spring+hibernate的web施用<四> Web层代码编写(1)String?value=filterConfig.getInitParameter("ignore");
struts+spring+hibernate的web施用<四> Web层代码编写(1)if(value==null)
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.ignore=true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)else?if(value.equalsIgnoreCase("true"))
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.ignore=true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)else
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.ignore=false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?void?doFilter(ServletRequest?request,?ServletResponse?response,?FilterChain?chain)?throws?IOException,?ServletException?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)//?TODO?自动生成方法存根
struts+spring+hibernate的web施用<四> Web层代码编写(1)if?(ignore?||?(request.getCharacterEncoding()?==?null))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)String?encoding?=?selectEncoding(request);
struts+spring+hibernate的web施用<四> Web层代码编写(1)if?(encoding?!=?null)
struts+spring+hibernate的web施用<四> Web层代码编写(1)request.setCharacterEncoding(encoding);
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)chain.doFilter(request,?response);
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)public?void?destroy()?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)//?TODO?自动生成方法存根
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.encoding?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)this.filterConfig?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)protected?String?selectEncoding(ServletRequest?request)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)return?(this.encoding);
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)}
struts+spring+hibernate的web施用<四> Web层代码编写(1)

log4j.rootLogger=info,console
struts+spring+hibernate的web施用<四> Web层代码编写(1)log4j.appender.console=org.apache.log4j.ConsoleAppender
struts+spring+hibernate的web施用<四> Web层代码编写(1)log4j.appender.console.layout=org.apache.log4j.SimpleLayout
struts+spring+hibernate的web施用<四> Web层代码编写(1)log4j.logger.com.wehave=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.org.springframework=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?SqlMap?logging?configurationstruts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.com.ibatis=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.com.ibatis.common.jdbc.SimpleDataSource=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.com.ibatis.common.jdbc.ScriptRunner=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.com.ibatis.sqlmap.engine.impl.SqlMapClientDelegate=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)log4j.logger.java.sql.Connection=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#?log4j.logger.java.sql.Statement=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)log4j.logger.java.sql.PreparedStatement=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#log4j.logger.java.sql.ResultSet=DEBUG
struts+spring+hibernate的web施用<四> Web层代码编写(1)#log4j.logger.javax.sql=DEBUG

<!DOCTYPE?form-validation?PUBLIC
struts+spring+hibernate的web施用<四> Web层代码编写(1)????"-//Apache?Software?Foundation//DTD?Commons?Validator?Rules?Configuration?1.0//EN"
struts+spring+hibernate的web施用<四> Web层代码编写(1)????"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????
struts+spring+hibernate的web施用<四> Web层代码编写(1)<form-validation>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<formset>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<form?name="productsForm">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<field?property="gameNameCn"?depends="required">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<arg0?key="errors.gameNameCn"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</field>????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<field?property="gameNameEn"?depends="required">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<arg0?key="errors.gameNameEn"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</field>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<field?property="gameCapacity"?depends="integer">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<arg0?key="errors.gameCapacity"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</field>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<field?property="gamePrice"?depends="float">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????<arg0?key="errors.gamePrice"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????</field>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</form>????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</formset>
struts+spring+hibernate的web施用<四> Web层代码编写(1)</form-validation>

<?xml?version="1.0"?encoding="ISO-8859-1"??>
struts+spring+hibernate的web施用<四> Web层代码编写(1)<!DOCTYPE?form-validation?PUBLIC
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????"-//Apache?Software?Foundation//DTD?Commons?Validator?Rules?Configuration?1.0//EN"
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
struts+spring+hibernate的web施用<四> Web层代码编写(1)<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)???This?file?contains?the?default?Struts?Validator?pluggable?validator
struts+spring+hibernate的web施用<四> Web层代码编写(1)???definitions.??It?should?be?placed?somewhere?under?/WEB-INF?and
struts+spring+hibernate的web施用<四> Web层代码编写(1)???referenced?in?the?struts-config.xml?under?the?plug-in?element
struts+spring+hibernate的web施用<四> Web层代码编写(1)???for?the?ValidatorPlugIn.
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????<plug-in?className="org.apache.struts.validator.ValidatorPlugIn">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<set-property?property="pathnames"?value="/WEB-INF/validator-rules.xml,
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????????????????????/WEB-INF/validation.xml"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????</plug-in>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)???These?are?the?default?error?messages?associated?with
struts+spring+hibernate的web施用<四> Web层代码编写(1)???each?validator?defined?in?this?file.??They?should?be
struts+spring+hibernate的web施用<四> Web层代码编写(1)???added?to?your?projects?ApplicationResources.properties
struts+spring+hibernate的web施用<四> Web层代码编写(1)???file?or?you?can?associate?new?ones?by?modifying?the
struts+spring+hibernate的web施用<四> Web层代码编写(1)???pluggable?validators?msg?attributes?in?this?file.
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)???#?Struts?Validator?Error?Messages
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.required={0}?is?required.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.minlength={0}?can?not?be?less?than?{1}?characters.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.maxlength={0}?can?not?be?greater?than?{1}?characters.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.invalid={0}?is?invalid.
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.byte={0}?must?be?a?byte.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.short={0}?must?be?a?short.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.integer={0}?must?be?an?integer.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.long={0}?must?be?a?long.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.float={0}?must?be?a?float.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.double={0}?must?be?a?double.
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.date={0}?is?not?a?date.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.range={0}?is?not?in?the?range?{1}?through?{2}.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.creditcard={0}?is?an?invalid?credit?card?number.
struts+spring+hibernate的web施用<四> Web层代码编写(1)???errors.email={0}?is?an?invalid?e-mail?address.
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)<form-validation>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????<global>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="required"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateRequired"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????msg="errors.required">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateRequired(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oRequired?=?new?required();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oRequired)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oRequired[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'file'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'select-one'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'radio'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'password'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'hidden')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value?=?'';
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????//?get?field's?value
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.type?==?"select-one")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?si?=?field.selectedIndex;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(si?>=?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????value?=?field.options[si].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????value?=?field.value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(trim(value).length?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oRequired[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????if(focusField.type!='hidden'){
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????//?Trim?whitespace?from?left?and?right?sides?of?s.
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?trim(s)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?s.replace(?/^\s*/,?""?).replace(?/\s*$/,?""?);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D???′???ò2??ü?a??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="requiredif"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateRequiredIf"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????org.apache.commons.validator.Validator,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????msg="errors.required">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateRequiredIf(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?j=0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oRequiredif?=?new?requiredif();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oRequiredif)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oRequiredif[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for(var?ii=0;ii<field.length;ii++){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if(field[ii].checked==true){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?(j?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oRequiredif[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="minlength"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateMinLength"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.minlength">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateMinLength(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oMinLength?=?new?minlength();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oMinLength)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oMinLength[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'password')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?iMin?=?parseInt(oMinLength[x][2]("minlength"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?((trim(field.value).length?>?0)?&&?(field.value.length?<?iMin))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oMinLength[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="maxlength"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateMaxLength"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.maxlength">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateMaxLength(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oMaxLength?=?new?maxlength();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oMaxLength)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oMaxLength[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'password')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?iMax?=?parseInt(oMaxLength[x][2]("maxlength"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.value.length?>?iMax)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oMaxLength[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="mask"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateMask"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.invalid">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateMask(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oMasked?=?new?mask();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oMasked)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oMasked[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((field.type?==?'text'?||?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????field.type?==?'textarea'||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'password')?&&?
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????(field.value.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!matchPattern(field.value,?oMasked[x][2]("mask")))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oMasked[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?matchPattern(value,?mask)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????return?mask.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="byte"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateByte"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.byte"?jsFunctionName="ByteValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateByte(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oByte?=?new?ByteValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oByte)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oByte[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'select-one'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'radio')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value?=?'';
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????//?get?field's?value
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.type?==?"select-one")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?si?=?field.selectedIndex;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(si?>=?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????value?=?field.options[si].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????value?=?field.value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????fields[i++]?=?oByte[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseInt(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue)?||?!(iValue?>=?-128?&&?iValue?<=?127))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????fields[i++]?=?oByte[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="short"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateShort"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.short"?jsFunctionName="ShortValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateShort(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oShort?=?new?ShortValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oShort)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oShort[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'select-one'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'radio')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value?=?'';
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????//?get?field's?value
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.type?==?"select-one")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?si?=?field.selectedIndex;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(si?>=?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????value?=?field.options[si].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????value?=?field.value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????fields[i++]?=?oShort[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseInt(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue)?||?!(iValue?>=?-32768?&&?iValue?<=?32767))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????fields[i++]?=?oShort[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="integer"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateInteger"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.integer"?jsFunctionName="IntegerValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateInteger(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oInteger?=?new?IntegerValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oInteger)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oInteger[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'select-one'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'radio')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value?=?'';
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????//?get?field's?value
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.type?==?"select-one")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?si?=?field.selectedIndex;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(si?>=?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????value?=?field.options[si].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????value?=?field.value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????fields[i++]?=?oInteger[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseInt(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue)?||?!(iValue?>=?-2147483648?&&?iValue?<=?2147483647))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????fields[i++]?=?oInteger[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?isAllDigits(argvalue)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????argvalue?=?argvalue.toString();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?validChars?=?"0123456789";
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?startFrom?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(argvalue.substring(0,?2)?==?"0x")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????validChars?=?"0123456789abcdefABCDEF";
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????startFrom?=?2;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}?else?if?(argvalue.charAt(0)?==?"-")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????startFrom?=?1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(var?n?=?startFrom;?n?<?argvalue.length;?n++)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(validChars.indexOf(argvalue.substring(n,?n+1))?==?-1)?return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="long"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateLong"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.long"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="float"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateFloat"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.float"?jsFunctionName="FloatValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateFloat(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oFloat?=?new?FloatValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oFloat)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oFloat[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'textarea'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'select-one'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????field.type?==?'radio')?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value?=?'';
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????//?get?field's?value
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(field.type?==?"select-one")?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?si?=?field.selectedIndex;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(si?>=?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????value?=?field.options[si].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????value?=?field.value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????//?remove?'.'?before?checking?digits
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?tempArray?=?value.split('.');
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?joinedString=?tempArray.join('');
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(joinedString))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????fields[i++]?=?oFloat[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseFloat(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????fields[i++]?=?oFloat[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="double"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateDouble"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.double"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="date"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateDate"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.date"?jsFunctionName="DateValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateDate(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????oDate?=?new?DateValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????for?(x?in?oDate)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????var?value?=?form[oDate[x][0]].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????var?datePattern?=?oDate[x][2]("datePatternStrict");
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????if?((form[oDate[x][0]].type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????form[oDate[x][0]].type?==?'textarea')?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????(value.length?>?0)?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????(datePattern.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?MONTH?=?"MM";
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?DAY?=?"dd";
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?YEAR?=?"yyyy";
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?orderMonth?=?datePattern.indexOf(MONTH);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?orderDay?=?datePattern.indexOf(DAY);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????var?orderYear?=?datePattern.indexOf(YEAR);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?((orderDay?<?orderYear?&&?orderDay?>?orderMonth))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim1?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim2?=?orderDay?+?DAY.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if?(iDelim1?==?orderDay?&&?iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim1?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isValidDate(matched[2],?matched[1],?matched[3]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????}?else?if?((orderMonth?<?orderYear?&&?orderMonth?>?orderDay))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim1?=?orderDay?+?DAY.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim2?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if?(iDelim1?==?orderMonth?&&?iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim1?==?orderMonth)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(!isValidDate(matched[1],?matched[2],?matched[3]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????}?else?if?((orderMonth?>?orderYear?&&?orderMonth?<?orderDay))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim1?=?orderYear?+?YEAR.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?iDelim2?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if?(iDelim1?==?orderMonth?&&?iDelim2?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim1?==?orderMonth)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})(\\d{2})["?+?delim2?+?"](\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?if?(iDelim2?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})["?+?delim1?+?"](\\d{2})(\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(!isValidDate(matched[3],?matched[2],?matched[1]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????focusField?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????function?isValidDate(day,?month,?year)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????if?(month?<?1?||?month?>?12)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(day?<?1?||?day?>?31)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?((month?==?4?||?month?==?6?||?month?==?9?||?month?==?11)?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????(day?==?31))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(month?==?2)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?leap?=?(year?%?4?==?0?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????(year?%?100?!=?0?||?year?%?400?==?0));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(day>29?||?(day?==?29?&&?!leap))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--?range?is?deprecated?use?intRange?instead?-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="range"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateIntRange"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends="integer"?msg="errors.range">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateRange(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?validateIntRange(form);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="intRange"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateIntRange"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends="integer"?msg="errors.range">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateIntRange(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oRange?=?new?intRange();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oRange)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oRange[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????field.type?==?'textarea')?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????(field.value.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?iMin?=?parseInt(oRange[x][2]("min"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?iMax?=?parseInt(oRange[x][2]("max"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?iValue?=?parseInt(field.value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!(iValue?>=?iMin?&&?iValue?<=?iMax))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oRange[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="floatRange"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateFloatRange"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends="float"?msg="errors.range">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateFloatRange(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oRange?=?new?floatRange();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oRange)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oRange[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((field.type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????field.type?==?'textarea')?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????(field.value.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?fMin?=?parseFloat(oRange[x][2]("min"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?fMax?=?parseFloat(oRange[x][2]("max"));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?fValue?=?parseFloat(field.value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!(fValue?>=?fMin?&&?fValue?<=?fMax))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oRange[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="creditCard"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateCreditCard"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.creditcard">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateCreditCard(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oCreditCard?=?new?creditCard();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oCreditCard)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((form[oCreditCard[x][0]].type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????form[oCreditCard[x][0]].type?==?'textarea')?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????(form[oCreditCard[x][0]].value.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!luhnCheck(form[oCreditCard[x][0]].value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?form[oCreditCard[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oCreditCard[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????/**
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????*?Reference:?http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?luhnCheck(cardNumber)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(isLuhnNum(cardNumber))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?no_digit?=?cardNumber.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?oddoeven?=?no_digit?&?1;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?sum?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for?(var?count?=?0;?count?<?no_digit;?count++)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?digit?=?parseInt(cardNumber.charAt(count));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!((count?&?1)?^?oddoeven))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????digit?*=?2;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(digit?>?9)?digit?-=?9;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????};
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????sum?+=?digit;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????};
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(sum?==?0)?return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?(sum?%?10?==?0)?return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????};
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?isLuhnNum(argvalue)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????argvalue?=?argvalue.toString();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(argvalue.length?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(var?n?=?0;?n?<?argvalue.length;?n++)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((argvalue.substring(n,?n+1)?<?"0")?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????(argvalue.substring(n,n+1)?>?"9"))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="email"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateEmail"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.email">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateEmail(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oEmail?=?new?email();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oEmail)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????if?((form[oEmail[x][0]].type?==?'text'?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????form[oEmail[x][0]].type?==?'textarea')?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????(form[oEmail[x][0]].value.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(!checkEmail(form[oEmail[x][0]].value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?form[oEmail[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oEmail[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????/**
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????*?Reference:?Sandeep?V.?Tamhankar?(stamhankar@hotmail.com),
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????*?http://javascript.internet.com
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????*/
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?checkEmail(emailStr)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(emailStr.length?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?emailPat=/^(.+)@(.+)$/;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?specialChars="\\(\\)<>@,;:\\\\\\"\\.\\[\\]";
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?validChars="\[^\\s"?+?specialChars?+?"\]";
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?quotedUser="("[^"]*")";
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?atom=validChars?+?'+';
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?word="("?+?atom?+?"|"?+?quotedUser?+?")";
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?userPat=new?RegExp("^"?+?word?+?"(\\."?+?word?+?")*$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?domainPat=new?RegExp("^"?+?atom?+?"(\\."?+?atom?+?")*$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?matchArray=emailStr.match(emailPat);
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(matchArray?==?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?user=matchArray[1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?domain=matchArray[2];
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(user.match(userPat)?==?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?IPArray?=?domain.match(ipDomainPat);
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(IPArray?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????for?(var?i?=?1;?i?<=?4;?i++)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????if?(IPArray[i]?>?255)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?domainArray=domain.match(domainPat);
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(domainArray?==?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?atomPat=new?RegExp(atom,"g");
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?domArr=domain.match(atomPat);
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????var?len=domArr.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?((domArr[domArr.length-1].length?<?2)?||
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????(domArr[domArr.length-1].length?>?3))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????if?(len?<?2)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????return?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????return?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D??êy×é????êy?μ??2??ü?a??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="requiredArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateRequiredArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.required"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????jsFunctionName="RequiredArrayValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateRequiredArray(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?isValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?j=0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oRequired?=?new?RequiredArrayValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oRequired)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oRequired[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for(var?ii=0;ii<field.length;ii++){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if(field[ii].value.length>0){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?(j?<?field.length)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(i?==?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????focusField?=?field;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oRequired[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?isValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D??êy×é????2??a??μ?êy?μ??±?D??a??Dí
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="integerArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateIntegerArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.integer"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????jsFunctionName="IntegerArrayValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateIntegerArray(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?j=0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oInteger?=?new?IntegerArrayValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oInteger)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oInteger[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for(var?ii=0;ii<field.length;ii++){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value=field[ii].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(value))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;????????????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if(j==1){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field[ii];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseInt(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue)?||?!(iValue?>=?-2147483648?&&?iValue?<=?2147483647))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if(j==1){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field[ii];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?(j?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oInteger[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D??êy×é????2??a??μ?êy?μ??±?D??a??μ?Dí
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="floatArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateFloatArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.float"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????jsFunctionName="FloatArrayValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateFloatArray(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?j=0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oFloat?=?new?FloatArrayValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oFloat)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oFloat[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for(var?ii=0;ii<field.length;ii++){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value=field[ii].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????if?(value.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????//?remove?'.'?before?checking?digits
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?tempArray?=?value.split('.');
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????var?joinedString=?tempArray.join('');
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????if?(!isAllDigits(joinedString))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(j?==?1)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????focusField?=?field[ii];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????var?iValue?=?parseFloat(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(isNaN(iValue))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????if?(j?==?1)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????????focusField?=?field[ii];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????????bValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}??
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?(j?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oFloat[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????focusField.focus();
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D??êy×é????2??a??μ?êy?μ??±?D??a?????èDí
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="doubleArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateDoubleArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.double"/>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<!--
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????D??êy×é????2??a??μ?êy?μ??±?D??aè??úDí
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????·o£??2004
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????-->????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????<validator?name="dateArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????classname="org.apache.struts.validator.FieldChecks"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????method="validateDateArray"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????methodParams="java.lang.Object,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.ValidatorAction,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.commons.validator.Field,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????org.apache.struts.action.ActionErrors,
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????javax.servlet.http.HttpServletRequest"?
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????depends=""?msg="errors.date"?jsFunctionName="DateArrayValidations">
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????<javascript><![CDATA[
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????function?validateDateArray(form)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?bValid?=?true;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?focusField?=?null;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?i?=?0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?j=0;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????var?fields?=?new?Array();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????oDate?=?new?DateArrayValidations();
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????for?(x?in?oDate)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????var?field?=?form[oDate[x][0]];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????for(var?ii=0;ii<field.length;ii++){
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?value=field[ii].value;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????var?datePattern?=?oDate[x][2]("datePatternStrict");
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????if?((value.length?>?0)?&&
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????(datePattern.length?>?0))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?MONTH?=?"MM";
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?DAY?=?"dd";
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?YEAR?=?"yyyy";
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?orderMonth?=?datePattern.indexOf(MONTH);
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?orderDay?=?datePattern.indexOf(DAY);
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????var?orderYear?=?datePattern.indexOf(YEAR);
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????if?((orderDay?<?orderYear?&&?orderDay?>?orderMonth))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim1?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim2?=?orderDay?+?DAY.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(iDelim1?==?orderDay?&&?iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim1?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????if?(!isValidDate(matched[2],?matched[1],?matched[3]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????}?else?if?((orderMonth?<?orderYear?&&?orderMonth?>?orderDay))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim1?=?orderDay?+?DAY.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim2?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(iDelim1?==?orderMonth?&&?iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim1?==?orderMonth)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})(\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim2?==?orderYear)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})(\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{2})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{4})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????if?(!isValidDate(matched[1],?matched[2],?matched[3]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????????????}?else?if?((orderMonth?>?orderYear?&&?orderMonth?<?orderDay))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim1?=?orderYear?+?YEAR.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?iDelim2?=?orderMonth?+?MONTH.length;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim1?=?datePattern.substring(iDelim1,?iDelim1?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?delim2?=?datePattern.substring(iDelim2,?iDelim2?+?1);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if?(iDelim1?==?orderMonth?&&?iDelim2?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim1?==?orderMonth)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})(\\d{2})["?+?delim2?+?"](\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?if?(iDelim2?==?orderDay)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})["?+?delim1?+?"](\\d{2})(\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????dateRegexp?=?new?RegExp("^(\\d{4})["?+?delim1?+?"](\\d{2})["?+?delim2?+?"](\\d{2})$");
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????var?matched?=?dateRegexp.exec(value);
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????if(matched?!=?null)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????if?(!isValidDate(matched[3],?matched[2],?matched[1]))?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}?else?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????j++;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????????bValid?=??false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????}??????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)??????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????if?(j?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????fields[i++]?=?oDate[x][1];
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????????????isValid?=?false;
struts+spring+hibernate的web施用<四> Web层代码编写(1)?????????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????????
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????if?(fields.length?>?0)?{
struts+spring+hibernate的web施用<四> Web层代码编写(1)???????????????????alert(fields.join('\n'));
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????????return?bValid;
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????}
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????????]]>?</javascript>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????????</validator>
struts+spring+hibernate的web施用<四> Web层代码编写(1)????</global>
struts+spring+hibernate的web施用<四> Web层代码编写(1)
struts+spring+hibernate的web施用<四> Web层代码编写(1)</form-validation>
struts+spring+hibernate的web施用<四> Web层代码编写(1)

热点排行