findstaffinformationaction.java

来自「一个小型的医疗管理系统」· Java 代码 · 共 64 行

JAVA
64
字号
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xslpackage com.yourcompany.struts.action;import java.util.ArrayList;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 bean.*;import com.yourcompany.struts.form.FindStaffInformationForm;/**  * MyEclipse Struts * Creation date: 10-19-2005 *  * XDoclet definition: * @struts.action path="/findStaffInformation" name="findStaffInformationForm" input="/form/findStaffInformation.jsp" scope="request" validate="true" */public class FindStaffInformationAction extends Action {	// --------------------------------------------------------- Instance Variables	// --------------------------------------------------------- Methods	/** 	 * Method execute	 * @param mapping	 * @param form	 * @param request	 * @param response	 * @return ActionForward	 * @throws Exception 	 */	public ActionForward execute(		ActionMapping mapping,		ActionForm form,		HttpServletRequest request,		HttpServletResponse response) throws Exception {		FindStaffInformationForm findStaffInformationForm = (FindStaffInformationForm) form;		// TODO Auto-generated method stub		HttpSession session = request.getSession();		String staffId = findStaffInformationForm.getStaffId();		HRM hrm = (HRM)session.getAttribute("hrm");		ArrayList experiences = (ArrayList)hrm.getExperience(staffId);		ArrayList qualifications = (ArrayList)hrm.getQualification(staffId);		Staff staff = hrm.getStaffInfo(staffId);		session.setAttribute("experiences",experiences);		session.setAttribute("qualifications",qualifications);		session.setAttribute("staffMem",staff);		return mapping.findForward("staffInformation");	}}

⌨️ 快捷键说明

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