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

📄 forwardsalesmanageraction.java

📁 这是本人以前在学校时
💻 JAVA
字号:
package com.funddeal.view.action.sales;

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.funddeal.base.StringUtil;
import com.funddeal.base.pagination.PageParaPOJO;
import com.funddeal.base.pagination.PageStaticFinal;
import com.funddeal.model.bean.operare_log.OperareLogJB;
import com.funddeal.model.bean.sales.SalesBean;

public class ForwardSalesManagerAction extends Action {
	public ActionForward execute(
			ActionMapping mapping,
			ActionForm form,
			HttpServletRequest request,
			HttpServletResponse response){
		String strPageIndex=request.getParameter("pageIndex");
		//当前页
		int pageIndex;
		//如果没有传当前页过来,默认为第一页
		if(strPageIndex==null){
			pageIndex=1;
		}else{
			pageIndex=StringUtil.toInt(strPageIndex);
		}
		//规定每页的记录数
		int pageSize=PageStaticFinal.pageSize;
		
		//实例化相对应的JavaBean
		SalesBean sJB=new SalesBean();
		//获得存储有数据集的分页对象
		PageParaPOJO pp = sJB.salesManagerJB(pageIndex,pageSize);
		if(pp==null){
			request.setAttribute("errorMsg",OperareLogJB.errorMsg);
			return mapping.findForward("Failure");
		}
		request.setAttribute("PageParaPojo",pp);//将分页对象放入request请求对象中
		return mapping.findForward("Success");	//转发给相应的页面
	}
}

⌨️ 快捷键说明

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