📄 removesmalltagaction.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 + -