public String init() { if (albumId > 0) { album = albumService.findById(albumId); if (album != null) { currentSongNumber = album.getSongs().size() + 1L; interpret = album.getInterpret(); imageName = album.getImageFilename(); } else { FacesContext context = FacesContext.getCurrentInstance(); FacesMessage message = guiUtils.getFacesMessage( FacesContext.getCurrentInstance(), FacesMessage.SEVERITY_ERROR, "album.init.albumNotFoundError"); context.addMessage(null, message); return "error"; } } return null; }
private void initSong() { currentSongNumber = album.getSongs().size() + 1L; currentSongDuration = null; currentSongTitle = null; editSong = null; }