Exemplo n.º 1
0
 public Resolution delete() {
   song = musicFacade.getSongById(song.getId());
   try {
     musicFacade.delete(song);
   } catch (DataAccessException ex) {
   }
   return new RedirectResolution(this.getClass(), "list");
 }
Exemplo n.º 2
0
 @Before(
     stages = LifecycleStage.BindingAndValidation,
     on = {"edit", "save", "details"})
 public void loadSongFromDatabase() {
   String ids = getContext().getRequest().getParameter("song.id");
   if (ids == null) {
     return;
   }
   song = musicFacade.getSongById(Long.parseLong(ids));
 }