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

📄 removesmalltagaction.java

📁 这是本人曾经在公司里用的,内部开发框架,基于struts+hibernate今天分享给大家
💻 JAVA
字号:
/**
 * 
 */
package cn.bway.foreigntrade.commondata.smalltag.action;

import java.io.UnsupportedEncodingException;
import javax.servlet.http.*;
import org.apache.struts.action.*;
import org.hibernate.Transaction;

import cn.bway.common.BwayHibernateException;
import cn.bway.common.WebConstant;
import cn.bway.common.action.BaseAction;
import cn.bway.common.dao.HibernateSessionFactory;
import cn.bway.foreigntrade.commondata.smalltag.form.SmalltagForm;
import cn.bway.foreigntrade.commondata.smalltag.impl.SmalltagManagerFactory;
import cn.bway.myoffice.merchant.impl.MerchantManagerFactory;

/**
 * @author Kson
 * 
 */
public class RemoveSmalltagAction extends BaseAction {

	/**
	 * Method execute
	 * 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		SmalltagForm pForm = (SmalltagForm) form;
		ActionErrors errors = new ActionErrors();
		String returnStr = WebConstant.FORWARD_INITPAGE;
		String id = request.getParameter("id");
		try {
			SmalltagManagerFactory.getSmalltagManager().deleteSmalltag(id);
		} catch (BwayHibernateException e) {
			returnStr=WebConstant.FORWARD_FAIL;
			errors.add(ActionErrors.GLOBAL_ERROR,new ActionError("edu.system.excption",e.getMessage()));
			this.saveErrors(request,errors);
			e.printStackTrace();
		}
		return mapping.findForward(returnStr);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -