List of usage examples for org.springframework.ui Model addAttribute
Model addAttribute(String attributeName, @Nullable Object attributeValue);
From source file:cs544.videohouse.controller.VideoController.java
@RequestMapping(value = "/upload", method = RequestMethod.GET) public String uploadVideo(Model model) { model.addAttribute("video", new Video()); return "upload"; }
From source file:cz.muni.fi.editor.webapp.controllers.NotificationController.java
@RequestMapping(value = "/{page}/{includeSeen}/", method = RequestMethod.GET) public String listPaginated(@PathVariable int page, @PathVariable boolean includeSeen, Model model) { model.addAttribute("notifications", notificationService.getNotifications(new NotificationRequest(page, includeSeen))); return "notification.list"; }
From source file:cz.muni.fi.editor.webapp.controllers.RequestController.java
@RequestMapping("/") public String list(Model model) { model.addAttribute("requests", requestService.getUnApproved()); return "request.list"; }
From source file:mvc.controller.TarefaController.java
@RequestMapping("/listaTarefas") public String lista(Model model) { model.addAttribute("listaTarefas", dao.listarTarefas()); return "tarefa/listagem-tarefas"; }
From source file:mvc.controller.TarefaController.java
@RequestMapping("/exibeTarefa") public String exibe(Long id, Model model) { model.addAttribute("tarefa", dao.buscarTarefaPorId(id)); return "tarefa/exibe-tarefa"; }
From source file:net.triptech.metahive.web.PreferencesController.java
@RequestMapping(method = RequestMethod.GET) @PreAuthorize("hasRole('ROLE_ADMIN')") public String updateForm(Model uiModel) { uiModel.addAttribute("metahivePreferences", this.loadPreferences()); return "preferences/update"; }
From source file:org.fenixedu.spaces.ui.MyOccupationRequestController.java
@RequestMapping(value = "create", method = RequestMethod.GET) public String showCreateForm(Model model) { model.addAttribute("campus", occupationService.getTopLevelSpaces()); model.addAttribute("occupation", new OccupationRequestBean()); return "occupations/requests/create"; }
From source file:org.wallride.web.controller.admin.page.PageTreeController.java
@RequestMapping(params = "part=page-edit-form") public String partPageEditDialog(@PathVariable String language, @RequestParam long id, Model model) { model.addAttribute("pageNodes", pageUtils.getNodes(true)); model.addAttribute("page", pageService.getPageById(id, language)); return "page/tree::page-edit-form"; }
From source file:pt.ist.fenixedu.delegates.ui.DelegatesController.java
@RequestMapping(value = "/search", method = RequestMethod.GET) public String search(Model model) { model.addAttribute("action", "/delegates/search"); return "delegates/search"; }
From source file:ru.trett.cis.controllers.DeviceBrandController.java
@RequestMapping(value = "/list") public String list(Model model) { model.addAttribute("object", "DeviceBrand"); return "devicebrand/table"; }