List of usage examples for org.springframework.ui Model addAttribute
Model addAttribute(Object attributeValue);
From source file:controller.EditCarController.java
@RequestMapping(value = "editproduct/car/{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 "editCar"; }
From source file:com.springinpractice.ch11.web.controller.datacenter.DataCenterCrudController.java
@Override protected void populateReferenceData(Model model) { model.addAttribute(regionService.findAll()); }
From source file:com.springinpractice.ch11.web.controller.environment.EnvironmentCrudController.java
@Override protected Environment doGetDetails(Long id, Model model) { model.addAttribute(farmService.findByEnvironment(new Environment(id))); return environmentService.findOne(id); }
From source file:com.amuponda.estorehack.client.web.controller.ProductController.java
/** * Requests the new product form/*from w w w . j a va2s. com*/ * @param model * @return */ @RequestMapping(value = "/add", method = GET) public String getProductForm(Model model) { model.addAttribute(new Product()); model.addAttribute(categoryService.findAll()); return "product/productForm"; }
From source file:com.costrategix.user.web.UserController.java
@RequestMapping(method = RequestMethod.GET) public String getCreateForm(Model model) { model.addAttribute(new User()); return "user/createForm"; }
From source file:com.springinpractice.ch11.web.controller.farm.FarmCrudController.java
@Override protected void populateReferenceData(Model model) { model.addAttribute(dataCenterService.findAll()); model.addAttribute(environmentService.findAll()); }
From source file:com.github.carlomicieli.nerdmovies.controllers.AuthController.java
@RequestMapping(value = "/signup", method = RequestMethod.GET) public String signUp(Model model) { model.addAttribute(new MailUser()); return "auth/signup"; }
From source file:funnycats.CatController.java
@RequestMapping(method = RequestMethod.GET) public String getCats(Model model) { model.addAttribute(new FunnyCat()); return "cats/main"; }
From source file:com.vgorcinschi.concordiafootballmanager.web.PersonGenerationController.java
@RequestMapping(value = "/createplayer", method = GET) public String createPlayerForm(Model model) { model.addAttribute(new PlayerForm()); return "playerForm"; }
From source file:com.vgorcinschi.concordiafootballmanager.web.PersonGenerationController.java
@RequestMapping(value = "/createtrainer", method = GET) public String createTrainerForm(Model model) { model.addAttribute(new TrainerForm()); return "trainerForm"; }