Beispiel #1
0
  @RequestMapping(value = "/batch/byId")
  public ModelAndView batchById(@RequestParam("id") int id) {
    ModelAndView view = new ModelAndView("secure/batch");

    view.addObject("update", true);
    BatchDto batchDto = batchService.findBatchById(id);
    view.addObject("batch", batchDto);
    view.addObject("ingredients", ingredientService.getIngredients());
    view.addObject("batchIngredients", batchDto.getIngredients());

    return view;
  }