List of usage examples for org.springframework.ui Model asMap
Map<String, Object> asMap();
From source file:com.baomidou.framework.mail.MailHelper.java
public boolean sendMail(String to, String subject, String tplName, Model model) { return sendMail(to, subject, tplName, model.asMap()); }
From source file:com.baomidou.framework.mail.MailHelper.java
public boolean sendMail(String[] to, String subject, String tplName, Model model) { return sendMail(to, subject, tplName, model.asMap()); }
From source file:com.iiiss.spring.impl.test.UserControllerTest.java
private void assertMessageOnly(Model model, String msg) { String message = (String) model.asMap().get("message"); assertEquals(msg, message);/* w w w . jav a2 s. c o m*/ assertTrue(null == model.asMap().get("username")); assertTrue(null == model.asMap().get("password")); }
From source file:com.work.petclinic.web.OwnerController.java
@RequestMapping(method = RequestMethod.GET) public ModelAndView showOwners(Model model) { return new ModelAndView("redirect:/owners/list.html", model.asMap()); }
From source file:net.triptech.metahive.web.OrganisationController.java
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE) @PreAuthorize("hasRole('ROLE_ADMIN')") public String delete(@PathVariable("id") Long id, Model uiModel, HttpServletRequest request) { Organisation.findOrganisation(id).remove(); uiModel.asMap().clear(); FlashScope.appendMessage(getMessage("metahive_delete_complete", Organisation.class), request); return "redirect:/organisations"; }
From source file:org.wallride.web.controller.guest.user.PasswordResetController.java
@RequestMapping(method = RequestMethod.GET, params = "step.token") public String token(Model model) { PasswordResetToken passwordResetToken = (PasswordResetToken) model.asMap().get("passwordResetToken"); if (passwordResetToken == null) { return "redirect:/password-reset"; }/*from w ww.j a v a2 s. c om*/ return "user/password-reset2-token"; }
From source file:com.iiiss.spring.impl.test.UserControllerTest.java
private void assertNullMessage(Model model, String username, String password) { assertTrue(null == model.asMap().get("message")); assertEquals(username, model.asMap().get("username")); assertEquals(password, model.asMap().get("password")); }
From source file:org.wallride.web.controller.admin.customfield.CustomFieldEditController.java
@RequestMapping(method = RequestMethod.GET) public String edit(@PathVariable String language, @RequestParam long id, Model model, RedirectAttributes redirectAttributes) { CustomField customField = (CustomField) model.asMap().get("customField"); if (!language.equals(customField.getLanguage())) { redirectAttributes.addAttribute("language", language); return "redirect:/_admin/{language}/customfields/index"; }//from w w w .j a v a 2 s. com CustomFieldEditForm form = CustomFieldEditForm.fromDomainObject(customField); model.addAttribute("form", form); return "customfield/edit"; }
From source file:com.qubit.solution.fenixedu.bennu.webservices.ui.management.webservicesClients.WebServiceClientConfigurationController.java
private WebServiceClientConfiguration getWebServiceClientConfiguration(Model m) { return (WebServiceClientConfiguration) m.asMap().get("webServiceClientConfiguration"); }
From source file:com.baomidou.framework.mail.MailHelper.java
public boolean sendMail(String personal, String from, String[] to, String subject, String tplName, Model model) { return sendMail(personal, from, to, subject, tplName, model.asMap()); }