List of usage examples for org.springframework.ui ModelMap ModelMap
public ModelMap(Object attributeValue)
From source file:com.asual.summer.sample.web.TechnologyController.java
@RequestMapping(method = RequestMethod.GET) @ResponseViews(AbstractResponseView.class) public ModelAndView list() { return new ModelAndView("/list", new ModelMap(Technology.list())); }
From source file:org.eclipse.virgo.samples.formtags.par.web.FormController.java
protected Map<?, ?> referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception { return new ModelMap(this.userManager.findAllCountries()).addAttribute("skills", getSkills()) .addAttribute(this.userManager.findAll()); }
From source file:com.asual.summer.sample.web.TechnologyController.java
@RequestMapping(value = "/{value}", method = RequestMethod.GET) @ResponseViews({ JsonView.class, XmlView.class }) public ModelAndView view(@PathVariable("value") String value) { Technology technology = Technology.find(value); if (technology == null) { throw new ViewNotFoundException(); }//from ww w .ja v a2 s. c o m return new ModelAndView("/view", new ModelMap(technology)); }
From source file:org.agatom.springatom.cmp.wizards.validation.ValidationServiceImpl.java
private ValidationContext getValidationContext(final ValidationBean validationBean, final MessageContext messageContext) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(String.format("getValidationContext(validationBean=%s,messageContext=%s)", validationBean, messageContext));//from w ww . ja v a 2 s.c o m } return new DefaultValidationContext().setPrincipal(null) // TODO add retrieving principal .setStepId(validationBean.getStepId()) .setBindingModel(new ModelMap(validationBean.getBindingModel())) .setFormData(new ModelMap(validationBean.getFormData())).setMessageContext(messageContext); }