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

📄 orderinfoaction.java

📁 该系统的主要功能是
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.laoniu.web.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.laoniu.bean.Orderform;
import com.laoniu.common.BeanFactory;
import com.laoniu.common.exception.OrderServiceException;
import com.laoniu.service.IOrderService;
import com.laoniu.web.form.OrderinfoForm;

/** 
 * MyEclipse Struts
 * Creation date: 04-29-2008
 * 
 * XDoclet definition:
 * @struts.action path="/orderinfo" name="orderinfoForm" input="/listOrder.jsp" scope="request" validate="true"
 * @struts.action-forward name="success" path="/orderinfo.jsp"
 * @struts.action-forward name="failure" path="/listOrder.jsp"
 */
public class OrderinfoAction extends Action {
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		OrderinfoForm orderinfoForm = (OrderinfoForm) form;
		Long orderid=orderinfoForm.getOrderid();
		
		IOrderService os=(IOrderService)BeanFactory.getBean(BeanFactory.ORDERSERVICE);
		
		try {
			Orderform orderform=os.findOrderById(orderid);
			request.setAttribute("orderinfo",orderform);
			return mapping.findForward("success");
		} catch (OrderServiceException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return mapping.findForward("failure");
		}
		
	}
}

⌨️ 快捷键说明

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