public Resolution edit() { albums = musicFacade.getAllAlbums(); genres = musicFacade.getAllGenres(); artists = musicFacade.getAllArtists(); HttpSession session = getContext().getRequest().getSession(); playlists = musicFacade.getPlaylistsByAccount((String) session.getAttribute("username")); return new ForwardResolution("/song/edit.jsp"); }
@Override public Resolution handleValidationErrors(ValidationErrors errors) throws Exception { songs = musicFacade.getAllSongs(); albums = musicFacade.getAllAlbums(); genres = musicFacade.getAllGenres(); artists = musicFacade.getAllArtists(); HttpSession session = getContext().getRequest().getSession(); playlists = musicFacade.getPlaylistsByAccount((String) session.getAttribute("username")); return null; }