/** * 'Edit/New Biblio' icon implementation * * @param biblio_key the biblio key being edited (a value of 0 indicates a new biblio is to be * added). * @param filterBiblio_key the biblio key search criterion (may be empty) * @param filterStrain_key the strain key search criterion (may be empty) * @param filterPubmedId the pubmed id search criterion (may be empty) * @param filterBiblioAuthor1 the biblio author1 search criterion (may be empty) * @param filterBiblioJournal the biblio journal search criterion (may be empty) * @param filterBiblioTitle the biblio title search criterion (may be empty) * @param filterBiblioYear the biblio year search criterion (may be empty) * @param model the model * @return the view to show */ @RequestMapping(value = "/edit", method = RequestMethod.GET) public String edit( @RequestParam(value = "biblio_key") Integer biblio_key, @RequestParam(value = "filterBiblioKey", required = true) String filterBiblio_key, @RequestParam(value = "filterStrainKey", required = true) String filterStrain_key, @RequestParam(value = "filterPubmedId", required = true) String filterPubmedId, @RequestParam(value = "filterBiblioAuthor1", required = true) String filterBiblioAuthor1, @RequestParam(value = "filterBiblioJournal", required = true) String filterBiblioJournal, @RequestParam(value = "filterBiblioTitle", required = true) String filterBiblioTitle, @RequestParam(value = "filterBiblioYear", required = true) String filterBiblioYear, Model model) { // Save the filter info and add to model. Filter filter = buildFilter( filterBiblio_key, filterStrain_key, filterPubmedId, filterBiblioAuthor1, filterBiblioJournal, filterBiblioTitle, filterBiblioYear); model.addAttribute(filter); String loggedInUser = SecurityContextHolder.getContext().getAuthentication().getName(); model.addAttribute("loggedInUser", loggedInUser); Biblio biblio = bibliosManager.getBiblio(biblio_key); if (biblio == null) { biblio = new Biblio(); } model.addAttribute("biblio", biblio); return "biblioManagementDetail"; }