dicttypeaction.java
来自「这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用s」· Java 代码 · 共 50 行
JAVA
50 行
/*
* Created on 2004-9-1
*
*/
package com.esimple.service.dict.action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import com.esimple.framework.web.action.BaseForm;
import com.esimple.framework.util.BaseFormUtil;
import com.esimple.framework.web.action.IbatisSupportAction;
import com.esimple.service.dict.po.DictType;
/**
* @author steven
*
*/
public class DictTypeAction extends IbatisSupportAction {
/* (non-Javadoc)
* @see com.esimple.framework.web.action.BaseAction#execute(com.esimple.framework.web.action.BaseForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
protected String execute(
BaseForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
ActionErrors errors = new ActionErrors();
DictType type = new DictType();
BaseFormUtil.copySimpleProperties(type,form, true);
if( getSqlMapDao().load("EBS.Dict.loadDictType",type) == null){
getSqlMapDao().insert("EBS.Dict.addDictType",type);
errors.add( ActionErrors.GLOBAL_ERROR,
new ActionError("common.success"));
}else{
errors.add( ActionErrors.GLOBAL_ERROR,
new ActionError("error.dict.type.exist"));
}
saveErrors(request, errors);
return this.FORWARD_SUCCESS;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?