List of usage examples for org.springframework.ui Model addAttribute
Model addAttribute(Object attributeValue);
From source file:com.kazuki43zoo.jpetstore.ui.controller.AuthController.java
@GetMapping(params = "error") public String loginError(Model model) { model.addAttribute(new Messages().error("Credentials is invalid")); return loginForm(); }
From source file:com.sarm.utilitiesonweb.views.controller.EmployeeFormController.java
@RequestMapping(method = RequestMethod.GET) public String getUploadForm(Model model) { model.addAttribute(new EmployeeData()); return "main/addEmployee"; }
From source file:com.amuponda.estorehack.client.web.controller.CategoryController.java
/** * render the form for product categories * @param model//from w w w . j a va 2s. co m * @return */ @RequestMapping(value = "/add", method = GET) public String getProductCategoryForm(Model model) { model.addAttribute(new Category()); return "category/categoryForm"; }
From source file:com.springinpractice.ch11.web.controller.DashboardController.java
/** * @return logical view name//ww w . java 2 s . c om */ @RequestMapping(value = "", method = RequestMethod.GET) public String getDashboard(Model model) { model.addAttribute(applicationService.findAll()); return addNavigation(model, sitemap.getDashboardId()); }
From source file:whitelabel.cloud.webapp.impl.controller.DashboardsController.java
@RequestMapping({ "", "/index" }) public String index(HttpServletRequest request, HttpServletResponse response, Model model) { model.addAttribute(dashboardService.load()); return "dashboards/index"; }
From source file:whitelabel.cloud.webapp.impl.controller.LogAndJobsController.java
@RequestMapping({ "", "/index" }) public String index(HttpServletRequest request, HttpServletResponse response, Model model) { model.addAttribute(service.load()); return "logAndJobs/index"; }
From source file:controller.EditBikeController.java
@RequestMapping(value = "editproduct/bike/{id}", method = GET) //betreffende productgegevens ophalen public String showProductEdit(@PathVariable String id, Model model) { model.addAttribute(dao.findProductById(Long.parseLong(id), model.Car.class)); return "editBike"; }
From source file:info.michaelchurch.arule.controllers.ContactController.java
@RequestMapping(method = RequestMethod.GET) public String loadForm(Model model) { model.addAttribute(new Comment()); return "contact"; }
From source file:controller.AddBikeController.java
@RequestMapping(value = "addproduct/bike", method = GET) //GET request voor register geeft model met lege Product-entity door aan de viewResolver public String showProductAdd(Model model) { model.addAttribute(new model.Bike()); return "addBike"; }
From source file:controller.AddCarController.java
@RequestMapping(value = "addproduct/car", method = GET) //GET request voor register geeft model met lege Product-entity door aan de viewResolver public String showProductAdd(Model model) { model.addAttribute(new model.Car()); return "addCar"; }