📄 thpreeditaction.java
字号:
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.yourcompany.struts.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 allBeans.Teachers;
import allDAOFactory.ITeacherDAO;
import com.yourcompany.struts.form.TheditinfoForm;
/**
* MyEclipse Struts
* Creation date: 08-07-2008
*
* XDoclet definition:
* @struts.action path="/thpreedit" name="theditinfoForm" scope="request" validate="true"
*/
public class ThpreeditAction extends Action {
/*
* Generated Methods
*/
/**
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
TheditinfoForm theditinfoForm = (TheditinfoForm) form;// TODO Auto-generated method stub
String thid=(String)request.getSession().getAttribute("userID"); //得到教师的id
if(thid==null)
return mapping.findForward("tologinth");
ITeacherDAO thdao=new ITeacherDAO();
Teachers th=thdao.thget(thid);
request.setAttribute("thname", th.getThName());
request.setAttribute("thid", th.getThId());
theditinfoForm.setTh_email(th.getThEmail());
theditinfoForm.setTh_memo(th.getThMemo());
theditinfoForm.setTh_profession(th.getThProfession());
theditinfoForm.setTh_sex(th.getThSex());
theditinfoForm.setTh_study(th.getThStudy());
theditinfoForm.setTh_th_phone(th.getThPhone());
return mapping.findForward("totheditinfo");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -