コード例 #1
0
ファイル: AttachedInfoAction.java プロジェクト: a4m/newsisAP
  /**
   * Update foreign key of attachment Info
   *
   * @param mapping ActionMapping
   * @param form ActionForm
   * @param request HttpServletRequest
   * @param response HttpServletResponse
   */
  public void updateForeignKey(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    try {
      String attacheId = request.getParameter("attachId");
      String foreignKey = request.getParameter("foreignKey");

      //			AttachedInfoBo aibo = new AttachedInfoBo();
      AttachedInfoForm aif = attachedInfoBo.find(attacheId);
      aif.setForeignId(new Long(foreignKey));
      HttpSession session = request.getSession();
      aif.setUpdateBy((Long) session.getAttribute("userId"));
      aif.setUpdateDate(
          new Timestamp(
              ((MultiDate) SpringContextUtil.getBean("multiDate")).getMultiDate().getTime()));
      String strXml = "false";
      if (attachedInfoBo.modify(aif) == 1) {
        strXml = "true";
      }
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #2
0
ファイル: AttachedInfoAction.java プロジェクト: a4m/newsisAP
  /**
   * Modify attachment Info
   *
   * @param request HttpServletRequest
   * @param form ActionForm Data form
   * @return String Return addition page,forward = "AttachedInfoEdit"
   */
  public String modifyInit(HttpServletRequest request, ActionForm form) {
    String forward = "addInit";
    try {

      String chkId = (String) request.getParameter("id");
      chkId = chkId.trim();

      DepartmentForm departmentForm = new DepartmentForm();
      DepartmentQuery departmentQuery = new DepartmentQuery(departmentForm);
      request.setAttribute(
          "allDepartments",
          departmentQuery.doListQuery(departmentForm.getFromPage(), departmentForm.getToPage()));
      if (chkId != null && !chkId.equals("")) {
        //			AttachedInfoBo bo = new AttachedInfoBo();
        request.setAttribute("attachedInfoForm", attachedInfoBo.find(chkId));
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
    request.setAttribute("state", "modify");
    return forward;
  }
コード例 #3
0
ファイル: AttachedInfoAction.java プロジェクト: a4m/newsisAP
  /**
   * Query attachment Info details
   *
   * @param request HttpServletRequest
   * @param form ActionForm Data form
   * @return String Return attachemnt Info details,forward = "AttachedInfoEdit"
   */
  public String attachedInfoDetail(HttpServletRequest request, ActionForm form) {
    String forward = "addInit";

    try {
      String chkId = (String) request.getParameter("id");
      chkId = chkId.trim();

      AttachedInfoForm attachedInfoForm = null;

      if (chkId != null && !chkId.equals("")) {

        //					AttachedInfoBo ubo = new AttachedInfoBo();
        attachedInfoForm = attachedInfoBo.find(chkId);
        request.setAttribute("attachedInfoForm", attachedInfoForm);
      }

      request.setAttribute("attachedInfoForm", attachedInfoForm);
      request.setAttribute("state", "detail");

    } catch (Exception e) {
      e.printStackTrace();
    }
    return forward;
  }