示例#1
0
 public List<Result> autoComplete(String query) {
   List<Result> suggestions = new ArrayList<Result>();
   for (Result c : results) {
     if (String.valueOf(c.getId()).toLowerCase().startsWith(query.toLowerCase())) {
       suggestions.add(c);
     }
   }
   return suggestions;
 }
示例#2
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();
    }
  }
示例#3
0
  public void adjustSave() {

    resultB.setIdexec(resultB.getId());
    resultB.setResulttest(resultB.getResulttest());
    resultB.setComment(resultB.getComment());
    resultB.setIdtest(resultB.getIdtest());
  }
示例#4
0
 public void adjustUpdate() {
   // result.setId(result.getId());
   resultB.setResulttest(resultB.getResulttest());
   resultB.setComment(resultB.getComment());
 }