📄 getinfolistaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.oa.companyculture.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
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.oa.companyculture.db.InfoDao;
/**
* MyEclipse Struts
* Creation date: 09-25-2007
*
* XDoclet definition:
* @struts.action validate="true"
* @struts.action-forward name="success" path="/info.do"
*/
public class GetInfoListAction extends Action {
/*
* Generated Methods
*/
private InfoDao infoDao;
/**
* @return the infoDao
*/
public InfoDao getInfoDao() {
return infoDao;
}
/**
* @param infoDao the infoDao to set
*/
public void setInfoDao(InfoDao infoDao) {
this.infoDao = infoDao;
}
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
// TODO Auto-generated method stub
HttpSession session = request.getSession();
int id = Integer.parseInt(request.getParameter("id"));
session.setAttribute("id",id);
List list = (List) infoDao.findById(id);
session.setAttribute("tlist", list);
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -