示例#1
0
  public void save() {
    try {
      String idtest =
          FacesContext.getCurrentInstance()
              .getExternalContext()
              .getRequestParameterMap()
              .get("idtest");
      String idExec =
          FacesContext.getCurrentInstance()
              .getExternalContext()
              .getRequestParameterMap()
              .get("idExec");
      //			resultB.setId(Integer.parseInt(id));
      resultB.setIdexec(Integer.parseInt(idExec));
      resultB.setResulttest(resultB.getResulttest());
      resultB.setComment(resultB.getComment());
      //	resultB.setIdtest(resultB.getIdtest());
      resultB.setIdtest(Integer.parseInt(idtest));

      //	System.out.println(res);
      // System.out.println(comm);
      System.out.println(resultB.getComment());
      System.out.println(resultB.getIdtest());

      // adjustSave();
      getPersistence().save(resultB);
      listAll();
      new MessageBean().success();
    } catch (Exception e) {
      new MessageBean().error();
    }
  }
示例#2
0
  public void adjustSave() {

    resultB.setIdexec(resultB.getId());
    resultB.setResulttest(resultB.getResulttest());
    resultB.setComment(resultB.getComment());
    resultB.setIdtest(resultB.getIdtest());
  }