📄 addpopedomaction.java
字号:
//Created by MyEclipse Struts// XSL source (default): platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xslpackage com.gensou.struts.popedom;import java.util.List;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.gensou.dao.mange.popedom.PopedomDao;import com.gensou.logic.manage.popedom.AddPopedomSerivce;import com.gensou.struts.mamage.popedom.form.AddPopedomForm;/** * MyEclipse Struts * Creation date: 01-25-2007 * * XDoclet definition: * @struts.action path="/addPopedom" name="addPopedomForm" scope="request" validate="true" * @struts.action-forward name="error" path="/gjsp/manage/popedom/addPopedom.jsp" * @struts.action-forward name="succeed" path="/gjsp/manage/popedom/addPopedom.jsp" */public class AddPopedomAction 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 { AddPopedomForm addPopedomForm = (AddPopedomForm) form; String num = addPopedomForm.getId(); String name = addPopedomForm.getName(); String beizhu = addPopedomForm.getBeizhu(); AddPopedomSerivce aps = new AddPopedomSerivce(); aps.setNum(num); aps.setName(name); aps.setBeizhu(beizhu); PopedomDao pod = new PopedomDao(); aps = pod.addPopedom(aps); if(aps != null){ request.setAttribute("addQuanxianzu",aps); return mapping.findForward("succeed"); }else{ String error = "权限组编号或名称已存在 ,权限组添加失败!"; request.setAttribute("error",error); return mapping.findForward("error"); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -