Esempio n. 1
0
  @RequestMapping(value = "/supplier/byId")
  public ModelAndView supplierById(@RequestParam("id") String id) {
    ModelAndView view = new ModelAndView("secure/supplier");

    view.addObject("update", true);
    view.addObject("supplier", supplierService.findSupplierById(id));

    return view;
  }
Esempio n. 2
0
  @RequestMapping(value = "/ingredient/byId")
  public ModelAndView ingredientById(@RequestParam("id") int id) {
    IngredientDto ingredient = ingredientService.getIngredientById(id);
    ModelAndView view = new ModelAndView("secure/ingredient");
    view.addObject("suppliers", supplierService.getSuppliers());
    view.addObject("ingredientListItems", pullDownListService.getIngredientListItems());
    view.addObject("unitOfMeasurements", pullDownListService.getUnitOfMeasurements());
    view.addObject("supplierIdSelected", ingredient.getSupplierId());
    view.addObject("unitOfMeasurementIdSelected", ingredient.getUnitOfMeasurement());
    view.addObject("update", true);
    view.addObject("ingredient", ingredient);

    return view;
  }