📄 dofundfindbynameaction.java
字号:
package com.fund.fund.struts;
import com.fund.fund.FundDelegate;
import com.fund.fund.FundDto;
import java.util.Collection;
import java.util.ArrayList;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
*
* <p>Title: </p>
*
* <p>Description: </p>
*
* <p>Copyright: Copyright (c) 2005</p>
*
* <p>Company: </p>
*
* @author not attributable
* @version 1.0
*/
public class DoFundFindByNameAction extends Action {
/**
*
* @param actionMapping ActionMapping
* @param actionForm ActionForm
* @param httpServletRequest HttpServletRequest
* @param httpServletResponse HttpServletResponse
* @return ActionForward
*/
public ActionForward execute(ActionMapping actionMapping,
ActionForm actionForm,
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
FundDtoActionForm fundDtoActionForm = (FundDtoActionForm) actionForm;
try {
FundDelegate fundDelegate = new FundDelegate();
FundDto fundDto = fundDelegate.fundFindByName(fundDtoActionForm.
getFundName());
Collection resultList = new ArrayList();
resultList.add(fundDto);
fundDtoActionForm.setdetailListCollection(resultList);
httpServletRequest.setAttribute("finderMethodName",
"fundFindByName");
httpServletRequest.setAttribute("fundDtoActionForm",
fundDtoActionForm);
} catch (Exception ex) {
httpServletRequest.setAttribute("message",
"Error while performing finder. : "
+ ex.getMessage());
return (actionMapping.findForward("unknown-error"));
}
return (actionMapping.findForward("fundFinderResultsList"));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -