java - What's the difference between ModelAndView and ModelMap? -


is modelmap new name in spring 3 modelandview?

does functionality change in spring 3?

consider code in spring 3 app using modelmap:

 @requestmapping(value = "/order", method = requestmethod.get)  public final string setup(final modelmap model)  {   model.addattribute(order, new order());   return "setup";  } 

i know equivalent use here of modelandview in older spring app? require name change modelmap modelandview working in spring 2.5?

modelandview, name suggests, contains model, and name of view. modelmap, in contract, contains information model.

your example have been written (in "old" spring) as

 public modelandview handlerequest(httpservletrequest request, httpservletresponse response)  {   return new modelandview("setup", order, new order());  } 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -