public String modificar() { areaService.getAreaRepository().save(selecArea); FacesContext context = FacesContext.getCurrentInstance(); context.addMessage( null, new FacesMessage("Registro " + selecArea.getNombre() + " Actualizado")); return "/paginas/area/mantenimiento.xhtml?faces-redirect=true"; }
public String registrar() { areaService.getAreaRepository().save(area); area = new Area(); FacesContext context = FacesContext.getCurrentInstance(); context.addMessage(null, new FacesMessage("Registro " + area.getNombre() + " ingresado")); return "/paginas/area/mantenimiento.xhtml?faces-redirect=true"; }
public List<Area> getAreas() { areas = Lists.newArrayList(areaService.getAreaRepository().findAll()); return areas; }
@PostConstruct public void init() { areas = Lists.newArrayList(areaService.getAreaRepository().findAll()); }