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; }
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(); } }
public void adjustSave() { resultB.setIdexec(resultB.getId()); resultB.setResulttest(resultB.getResulttest()); resultB.setComment(resultB.getComment()); resultB.setIdtest(resultB.getIdtest()); }
public void adjustUpdate() { // result.setId(result.getId()); resultB.setResulttest(resultB.getResulttest()); resultB.setComment(resultB.getComment()); }