📄 changetaskaction.java
字号:
// Created by Xslt generator for Eclipse.// XSL : not found (java.io.FileNotFoundException: (Bad file descriptor))// Default XSL used : easystruts.jar$org.easystruts.xslgen.JavaClass.xslpackage com.cmmi2pms.pp.task;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 org.apache.log4j.Logger;/** * AddTaskAction.java created by EasyStruts - XsltGen. * http://easystruts.sf.net * created on 04-24-2004 * * XDoclet definition: * @struts:action path="/addtask" name="addtaskForm" input="/pages/pp/addtask.jsp" validate="true" * @struts:action-forward name="/pages/pp/taskinfo.jsp" path="/pages/pp/taskinfo.jsp" redirect="true" */public class ChangeTaskAction extends Action{ private static Logger logger = Logger.getLogger ("ChangeTaskAction") ; // --------------------------------------------------------- Instance Variables // --------------------------------------------------------- Methods /** * Method execute * @param ActionMapping mapping * @param ActionForm form * @param HttpServletRequest request * @param HttpServletResponse response * @return ActionForward * @throws Exception */ public ActionForward execute(ActionMapping mapping,ActionForm form, HttpServletRequest request,HttpServletResponse response)throws Exception {
/*
if(form==null)
{
form =new TaskForm();
if("request".equals(mapping.getScope()))
{
request.setAttribute(mapping.getAttribute(),form);
}else
{
request.getSession().setAttribute(mapping.getAttribute(),form);
}
}
*/ int taskId = Integer.valueOf(request.getParameter("taskid")).intValue(); Task task=new Task(); task.getTaskInfo(taskId);
TaskForm taskForm=(TaskForm)form;
taskForm.setTaskId(""+taskId);
taskForm.setTaskName(task.getTaskName());
taskForm.setPlanStart(task.getPlanStart());
taskForm.setPlanEnd(task.getPlanEnd());
taskForm.setHarves(task.getHarves());
taskForm.setTaskLoad(""+task.getTaskLoad());
taskForm.setDesc(task.getDesc()); //addTaskForm.resetForm(); //HttpSession session = request.getSession(); //session.setAttribute("taskInfo", task);
return (mapping.findForward("SUCCESS")); //throw new UnsupportedOperationException("Generated method 'execute(...)' not implemented."); }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -