public void deleteDiv(int id) { Division d = new Division(); d.setId(id); divisionService.delete(d); divs = divisionService.getAll(); FacesContext.getCurrentInstance() .addMessage( null, new FacesMessage(FacesMessage.SEVERITY_INFO, ParameterModel.STATUS_DELETE_SUCCESS, "")); }
public List<Division> getDivs() { if (divs == null) { divs = divisionService.getAll(); } return divs; }