⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 grtxl_listaction.java

📁 一段很有意义的源码,看了就知道,不信试一试啊!
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.wondersgroup.txl.web.Action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.wondersgroup.framework.core.bo.Page;
import com.wondersgroup.txl.service.GrTxlService;
import com.wondersgroup.txl.web.Form.GrTxlForm;

/** 
 * MyEclipse Struts
 * Creation date: 06-22-2007
 * 
 * XDoclet definition:
 * @struts.action path="/grTxl_ListAction" name="grTxlForm" scope="request" validate="true"
 */
public class GrTxl_ListAction extends Action {
	private GrTxlService grTxlService;
	/*
	 * Generated Methods
	 */

	public void setGrTxlService(GrTxlService grTxlService) {
		this.grTxlService = grTxlService;
	}

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		GrTxlForm grTxlForm = (GrTxlForm) form;
		int pageNo;
		String userid = "1";//request.getParameter("userid"); //用户id;
		String paStr = request.getParameter("pageNo");
		if(paStr==null){
			paStr="1";
		}
		pageNo = Integer.parseInt(paStr);//页码
		
		/**
		 * 查询条件
		 * xm 姓名
		 * dw 单位
		 * bm 部门		
		 * */
		String xm = grTxlForm.getXm();
		if(xm==null)xm="";
		String dw = grTxlForm.getDw();
		if(dw==null)dw = "";
		String bm = grTxlForm.getBm();
		if(bm==null)bm = "";
	
		Page page = grTxlService.getContractsGRList(userid, xm, dw, bm, pageNo, 3);//根据用户id查出,用户的所有个人通讯录记录;
		request.setAttribute("page", page);
		return mapping.findForward("list");
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -