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

📄 productaction.java

📁 关于ssh的整合,希望对大家有帮助
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package crm.web.action.other;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import crm.biz.other.ProductBiz;
import crm.web.form.other.DictForm;
import crm.web.form.other.ProductForm;

/** 
 * MyEclipse Struts
 * Creation date: 09-23-2008
 * 
 * XDoclet definition:
 * @struts.action path="/product" name="productForm" parameter="flag" scope="request" validate="true"
 */
public class ProductAction extends DispatchAction {
	private ProductBiz productBiz=null;
//	public ActionForward list(ActionMapping mapping, ActionForm form,
//			HttpServletRequest request, HttpServletResponse response) {
//		ProductForm pf = (ProductForm) form;
//		request.setAttribute("list", productBiz.findAll());
//		return mapping.findForward("list");
//	}
	public ActionForward search(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		ProductForm pf = (ProductForm) form;
	    System.out.println("1111111");
		List list=productBiz.search(pf.getEntity());
		System.out.println(pf.getEntity().getProdName());
		request.setAttribute("list", list);
	return mapping.findForward("list");
	}
	public void setProductBiz(ProductBiz productBiz) {
		this.productBiz = productBiz;
	}
	public ActionForward list(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		System.out.println("准备分野");
		Integer p=null;
		try {
			p=Integer.parseInt(request.getParameter("p"));
		} catch (Exception e) {
			e.printStackTrace();
			p=1;
		}
		int sum=productBiz.count();
		HttpSession session=request.getSession();
		session.setAttribute("sum", sum);
		System.out.println(p);
		request.setAttribute("list",productBiz.fenye(p));
		return mapping.findForward("list");
	}
	
}

⌨️ 快捷键说明

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