Esempio n. 1
0
 public boolean _caucho_isModified()
 {
   if (_caucho_isDead)
     return true;
   if (com.caucho.server.util.CauchoSystem.getVersionId() != 5783496155892875126L)
     return true;
   for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
     com.caucho.vfs.Dependency depend;
     depend = (com.caucho.vfs.Dependency) _caucho_depends.get(i);
     if (depend.isModified())
       return true;
   }
   return false;
 }
  /**
   * Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
   *
   * @param request servlet request
   * @param response servlet response
   */
  protected void processRequest(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();

    LookupService lookupService = new LookupService();
    coshms.ejb.pathalogy.PathalogyRemote pthRemoteSB = lookupService.lookupPathalogyBean();

    java.util.ArrayList pthTestDomainList = new java.util.ArrayList();
    int tStatus = 0;

    if (request.getParameter("status") != null) {
      tStatus = 1;
    }
    String[] cid = request.getParameterValues("contentId");
    String[] cname = request.getParameterValues("cname");
    String[] unit = request.getParameterValues("unit");
    String[] minvalue = request.getParameterValues("minvalue");
    String[] maxvalue = request.getParameterValues("maxvalue");

    for (int i = 0; i < cname.length; i++) {
      PthTestContentsInfo pthTestCon =
          new PthTestContentsInfo(
              "",
              Integer.parseInt(cid[i]),
              cname[i],
              Double.parseDouble(minvalue[i]),
              Double.parseDouble(maxvalue[i]),
              unit[i]);
      pthTestDomainList.add(pthTestCon);
    }
    int empId = 1;

    if (pthRemoteSB.pthTestDomainEdit(
        pthTestDomainList,
        request.getParameter("tname"),
        tStatus,
        Integer.parseInt(request.getParameter("tcost")),
        empId,
        Integer.parseInt(request.getParameter("testId"))))
      response.sendRedirect("pthMessage.jsp?message=Pathalogy Test Edit Successfully");
    else response.sendRedirect("pthMessage.jsp?message=Try Again");
    out.close();
  }