📄 xt6102e1saction.java
字号:
package jp.com.cost.xt.web.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jp.com.cost.common.ContextHelper;
import jp.com.cost.pojo.Account;
import jp.com.cost.xt.entity.XT6104ViewEntity1;
import jp.com.cost.xt.service.XT6102Service;
import jp.com.cost.xt.service.XT6104Service;
import jp.com.cost.xt.web.form.XT6102Form;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
public class XT6102E1SAction extends Action {
/*
* (non-Javadoc)
*
* @see org.apache.struts.action.Action#execute(org.apache.struts.action.ActionMapping,
* org.apache.struts.action.ActionForm,
* javax.servlet.http.HttpServletRequest,
* javax.servlet.http.HttpServletResponse)
*/
@Override
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
try {
// TODO Auto-generated method stub
XT6102Form xt6102form = (XT6102Form) form;
XT6102Service service = (XT6102Service) ContextHelper.getContext()
.getBean("xt6102ServiceProxy");
service.addAccount(xt6102form);
Account account = service.searchAccountID(xt6102form);
XT6104Service xt6104s = (XT6104Service) ContextHelper.getContext()
.getBean("xt6104ServiceProxy");
List list = xt6104s.searchAllRole();
request.getSession().setAttribute("xt6102form",xt6102form);
request.getSession().setAttribute("account",account);
request.getSession().setAttribute("xt6104ViewEntity1List",list);
} catch (RuntimeException e) {
// TODO Auto-generated catch block
return mapping.findForward("error");
}
return mapping.findForward("success");
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -