📄 dicttypeaction.java
字号:
/*
* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -