Пример #1
0
 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";
 }
Пример #2
0
 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";
 }
Пример #3
0
 public List<Area> getAreas() {
   areas = Lists.newArrayList(areaService.getAreaRepository().findAll());
   return areas;
 }
Пример #4
0
 @PostConstruct
 public void init() {
   areas = Lists.newArrayList(areaService.getAreaRepository().findAll());
 }