📄 adtoteachereditaction.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 com.yourcompany.struts.form.AdteachereditForm;
import allBeans.Teachers;
import allDAOFactory.ITeacherDAO;
/**
* MyEclipse Struts
* Creation date: 07-28-2008
*
* XDoclet definition:
* @struts.action path="/adtoteacheredit" name="adteachereditForm" scope="request" validate="true"
*/
public class AdtoteachereditAction 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) {
AdteachereditForm adteachereditForm = (AdteachereditForm) form;// TODO Auto-generated method stub
String id=request.getParameter("id");
ITeacherDAO thdao=new ITeacherDAO();
Teachers th=thdao.thget(id);
request.setAttribute("th_id", id);
adteachereditForm.setTh_id(th.getThId());
adteachereditForm.setTh_email(th.getThEmail());
adteachereditForm.setTh_memo(th.getThMemo());
adteachereditForm.setTh_name(th.getThName());
adteachereditForm.setTh_phone(th.getThPhone());
adteachereditForm.setTh_profession(th.getThProfession());
adteachereditForm.setTh_sex(th.getThSex());
adteachereditForm.setTh_study(th.getThStudy());
return mapping.findForward("toteacheredit");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -