protected ModelAndView onSubmit( HttpServletRequest request, HttpServletResponse response, Object com, BindException errors) throws Exception { IconCommand command = (IconCommand) com; command.setToast(true); command.setReloadNeeded(true); settingsService.setshowIconHome(command.isShowIconHome()); settingsService.setshowIconArtist(command.isShowIconArtist()); settingsService.setshowIconPlaying(command.isShowIconPlaying()); settingsService.setshowIconCover(command.isShowIconCover()); settingsService.setshowIconStarred(command.isShowIconStarred()); settingsService.setshowIconRadio(command.isShowIconRadio()); settingsService.setshowIconPodcast(command.isShowIconPodcast()); settingsService.setshowIconSettings(command.isShowIconSettings()); settingsService.setshowIconStatus(command.isShowIconStatus()); settingsService.setshowIconSocial(command.isShowIconSocial()); settingsService.setshowIconHistory(command.isShowIconHistory()); settingsService.setshowIconStatistics(command.isShowIconStatistics()); settingsService.setshowIconPlaylists(command.isShowIconPlaylists()); settingsService.setshowIconPlaylistEditor(command.isShowIconPlaylistEditor()); settingsService.setshowIconMore(command.isShowIconMore()); settingsService.setshowIconGenre(command.isShowIconGenre()); settingsService.setshowIconMoods(command.isShowIconMoods()); settingsService.setshowIconAbout(command.isShowIconAbout()); settingsService.setshowIconAdmins(command.isShowIconAdmins()); settingsService.save(); return new ModelAndView(getSuccessView(), errors.getModel()); }
protected Object formBackingObject(HttpServletRequest request) throws Exception { IconCommand command = new IconCommand(); command.setToast(false); command.setReloadNeeded(false); command.setShowIconHome(settingsService.showIconHome()); command.setShowIconArtist(settingsService.showIconArtist()); command.setShowIconPlaying(settingsService.showIconPlaying()); command.setShowIconCover(settingsService.showIconCover()); command.setShowIconStarred(settingsService.showIconStarred()); command.setShowIconRadio(settingsService.showIconRadio()); command.setShowIconPodcast(settingsService.showIconPodcast()); command.setShowIconSettings(settingsService.showIconSettings()); command.setShowIconStatus(settingsService.showIconStatus()); command.setShowIconSocial(settingsService.showIconSocial()); command.setShowIconHistory(settingsService.showIconHistory()); command.setShowIconStatistics(settingsService.showIconStatistics()); command.setShowIconPlaylists(settingsService.showIconPlaylists()); command.setShowIconPlaylistEditor(settingsService.showIconPlaylistEditor()); command.setShowIconMore(settingsService.showIconMore()); command.setShowIconAbout(settingsService.showIconAbout()); command.setShowIconGenre(settingsService.showIconGenre()); command.setShowIconMoods(settingsService.showIconMoods()); command.setShowIconAdmins(settingsService.showIconAdmins()); return command; }