private CrescentCollectionHandler collectionHandler;
@RequestMapping("/collectionManageMain")
public ModelAndView collectionManageMain(HttpServletRequest request, HttpServletResponse response) throws Exception {
CrescentCollections crescentCollections = collectionHandler.getCrescentCollections();
String selectedCollectionName = request.getParameter("collectionName");
if(selectedCollectionName == null) {
selectedCollectionName = crescentCollections.getCrescentCollections().get(0).getName();
}
ModelAndView modelAndView = new ModelAndView();
//modelAndView.addObject("crescentCollections", crescentCollections);
modelAndView.addObject("selectedCollectionName", selectedCollectionName);
List<CrescentCollection> crescentCollectionList = crescentCollections.getCrescentCollections();
modelAndView.addObject("crescentCollectionList", crescentCollectionList);
modelAndView.addObject("selectedCollection", crescentCollections.getCrescentCollection(selectedCollectionName));
modelAndView.setViewName("/admin/collectionManageMain");
return modelAndView;
}