Beispiel #1
0
 // 跳转修改页面
 public ActionForward updatePage(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response)
     throws AppException {
   AgentListForm agentListForm = (AgentListForm) form;
   request.setAttribute("companyList", PlatComAccountStore.companyList);
   long agentId = agentListForm.getSelectedItems()[0];
   if (agentId > 0) {
     Agent agent = agentBiz.getAgentByid(agentId);
     agent.setThisAction("updateAgent");
     agent.setCompanyId(agent.getCompany().getId());
     request.setAttribute("agent", agent);
   } else {
     request.setAttribute("agent", new Agent());
   }
   return mapping.findForward("editAgent");
 }