public String addDish() { dish.setCategory(categoryService.find(categoryId)); dishService.save(dish); return "administerMenuCategories"; }
public String addCategory() { categoryService.save(category); return "administerMenuCategories"; }
public String refreshDishesByCategoryList(String categoryId) { category = categoryService.find(Integer.parseInt(categoryId)); dishes = dishService.findByCategory(category); return "administerMenu"; }
public String editCategory(String categoryId) { category = categoryService.find(Integer.parseInt(categoryId)); return "createDishCategory"; }
public void refreshCategoryList() { categories = categoryService.findAll(); System.out.println(Arrays.toString(categories.toArray())); }