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

📄 editpaymentcardaction.java

📁 Struts+Spring+Hibernate实现的在线拍卖系统,去掉了这些组件自身的jar包
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package org.bestteam.web.struts.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 org.bestteam.domain.PaymentCard;
import org.bestteam.service.PaymentCardService;
import org.bestteam.web.struts.form.EditPaymentCardForm;

/** 
 * MyEclipse Struts
 * Creation date: 02-02-2007
 * 
 * XDoclet definition:
 * @struts.action path="/editCreditcard" name="editCreditcardForm" scope="request" validate="true"
 */
public class EditPaymentCardAction extends Action {
	private PaymentCardService paymentCardService;
	/*
	 * 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) {
		EditPaymentCardForm editPaymentCardForm = (EditPaymentCardForm) form;// TODO Auto-generated method stub
		String userName = editPaymentCardForm.getUserName();
		PaymentCard paymentCard = paymentCardService.getPaymentCard(userName);
		if (paymentCard == null) {
			request.setAttribute("errorMessage", "无法得到该用户的支付宝信息");
			request.setAttribute("forwardPage", "userinfo.jsp");
			return mapping.findForward("fail");
		}
		
		request.setAttribute("paymentCard", paymentCard);
		return mapping.findForward("success");
	}

	public void setPaymentCardService(PaymentCardService paymentCardService) {
		this.paymentCardService = paymentCardService;
	}
}

⌨️ 快捷键说明

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