Beispiel #1
0
 public ActionForward reseat(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   // TODO Auto-generated method stub
   if (request.getSession().getAttribute("loginUser") != null) {
     String oid = request.getParameter("oid");
     List list = ordetailService.getByOid(Integer.valueOf(oid));
     odetail = (Odetail) list.get(0);
     request.setAttribute("mtt", odetail.getTimetable());
     return mapping.findForward("goStep2");
   } else {
     return mapping.findForward("goLogin");
   }
 }
Beispiel #2
0
 public ActionForward submitOrder(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   String oid = request.getParameter("oid");
   // order = (Orders) orderService.findById(Orders.class, Integer.valueOf(oid));
   List list = ordetailService.getByOid(Integer.valueOf(oid));
   if (list.size() == 2) {
     request.setAttribute("mtt", list.get(0));
     request.setAttribute("seats", list.get(1));
   } else {
     request.setAttribute("mtt", list.get(0));
   }
   return mapping.findForward("goStep3");
 }