📄 selectpartaction.java
字号:
package com.t60.oa.web.org;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.Action;
import com.t60.oa.service.org.*;
import hong.javanet.dao.*;
public class SelectPartAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
SelectPartForm selectPartForm = (SelectPartForm) form;
// throw new java.lang.UnsupportedOperationException(
// "Method $execute() not yet implemented.");
SelectPart selectPart=new SelectPart();
selectPart.setForm(selectPartForm);
try {
request.setAttribute("selectPart",selectPart);
request.setAttribute("partId",request.getParameter("id"));
request.setAttribute("position",request.getParameter("position"));
new HibernateAspect().bind(selectPart, "selectPart").execute();
return mapping.findForward("yes"); //转到成功页面
} catch (Exception ex) {
return mapping.getInputForward(); //分发到输入页面
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -