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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -