⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dicttypeaction.java

📁 这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用struts,hebinate,xml等技术,有丰富的tag,role,navigation,session,dictio
💻 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 + -